Closed HamadHadi closed 3 years ago
i solve it by check the type of last data if return text
e.messages.map((a) => a.type)[n.state.messages.length - 1] === "text" ? Object(r.b)("input", { id: "userText", class: "textarea", style: "display:block", type: this.props.conf.type, placeholder: this.props.conf.placeholderText, ref: function(t) { n.input = t; }, onKeyPress: this.handleKeyPress, autofocus: !0, autocomplete: "off", disabled: false, }) : "",
if the return as action
e.messages.map((a) => a.type)[n.state.messages.length - 1] === "actions" ? Object(r.b)( "div", { class: "option_div", }, null, Object(r.b)( "div", { class: "option_text", }, "your message here" ) ) : "",
there any way to disable the user input if the conversation has buttons to make sure the user select one of buttons ?? any suggestion.