Feature Request: Hide send box input without hiding suggested actions
See original GitHub issueFeature Request
Describe the suggestion or request in detail
At the moment, customers can hide the Send Box through Web Chat’s style options; however, the hideSendBox
option also hides suggested actions. It would be beneficial to have the ability to hide the side box while still displaying the suggested action so that the user has to select one of the actions to continue the conversation.
The SuggestedActions
component would have to be moved outside of the SendBox
to accomplish this.
Describe alternatives you have considered
Additional context Original ask here: https://stackoverflow.com/questions/58116813/while-showing-button-choices-at-that-time-i-need-to-hide-sendbox-in-bot-framewo/
Ideally customers should be able to hide or disable the input field when Web Chat is displaying suggested actions. The code below is functional, but it also hides suggested actions.
const [hideSendBox, setHideSendBox] = useState(false);
const store = createStore(
{},
() => next => action => {
if (action.type === 'DIRECT_LINE/SET_SUGGESTED_ACTIONS') {
if (action.payload.suggestedActions.length) {
setHideSendBox(true);
} else {
setHideSendBox(false);
}
}
return next(action);
}
)
return <ReactWebChat directLine={directLine} store={store} styleOptions={{hideSendBox}} />
[Enhancement]
[Edit by @corinagum] Please add +1 to this thread if this is something you are looking to have available in your version of Web Chat.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:18 (9 by maintainers)
Top GitHub Comments
Alright, sounds good. Let’s see what kind of traction we get on this, and go from there.
If anyone is looking for this feature, please add your +1 to this thread so we know that people want this feature.
Is there an update on this yet? ‘hideSendBox’ flag is also hiding the suggested actions.