File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
package/src/components/MessageInput Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export type InputButtonsWithContextProps = Pick<
3636
3737const textComposerStateSelector = ( state : TextComposerState ) => ( {
3838 command : state . command ,
39- text : state . text ,
39+ hasText : ! ! state . text ,
4040} ) ;
4141
4242export const InputButtonsWithContext = ( props : InputButtonsWithContextProps ) => {
@@ -51,12 +51,11 @@ export const InputButtonsWithContext = (props: InputButtonsWithContextProps) =>
5151 uploadFile : ownCapabilitiesUploadFile ,
5252 } = props ;
5353 const { textComposer } = useMessageComposer ( ) ;
54- const { command, text } = useStateStore ( textComposer . state , textComposerStateSelector ) ;
54+ const { command, hasText } = useStateStore ( textComposer . state , textComposerStateSelector ) ;
5555
5656 const [ showMoreOptions , setShowMoreOptions ] = useState ( true ) ;
5757 const { attachments } = useAttachmentManagerState ( ) ;
5858
59- const hasText = ! ! text ;
6059 const shouldShowMoreOptions = hasText || ! ! attachments . length ;
6160
6261 useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ export type CommandInputProps = Partial<
2323} ;
2424const textComposerStateSelector = ( state : TextComposerState ) => ( {
2525 command : state . command ,
26- text : state . text ,
2726} ) ;
2827
2928export const CommandInput = ( {
You can’t perform that action at this time.
0 commit comments