Skip to content

feat: add disabled prop to ChatAutoComplete#2613

Closed
sergeichestakov wants to merge 1 commit intoGetStream:masterfrom
sergeichestakov:@sergeichestakov/chat-auto-complete-disabled-prop
Closed

feat: add disabled prop to ChatAutoComplete#2613
sergeichestakov wants to merge 1 commit intoGetStream:masterfrom
sergeichestakov:@sergeichestakov/chat-auto-complete-disabled-prop

Conversation

@sergeichestakov
Copy link

@sergeichestakov sergeichestakov commented Jan 21, 2025

🎯 Goal

Per convo in our shared Slack channel, I thought it would be useful if you could pass in a disabled prop to the ChatAutoComplete component which would be forwarded to the underlying textArea component. This becomes useful when implementing a custom Input component so that you can disable the text area from within the component instead of having to hoist state one level up and pass in a prop into the MessageInput instead which can lead to unnecessary rerenders of the parent component and feels like an extra level of indirection.

🛠 Implementation details

Add support for a disabled prop in the ChatAutoComplete component which overwrites and takes precedence over the initial disabled logic and corresponding message input context value.

🎨 UI Changes

N/A

@MartinCupela
Copy link
Contributor

Closing in favor of #2617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants