Skip to content

Conversation

@pmn4
Copy link
Contributor

@pmn4 pmn4 commented Sep 9, 2025

In my project, I wanted to add the disabled prop to ChatInput so I could disable it until my user had auth'ed, so I figured while here, I may as well add all form/input props and pass them through to the component

wanted to add the disabled prop to ChatInput so I could disable it until my user had authed, so figured while here, I may as well add all form/input props and pass them through to the component
@changeset-bot
Copy link

changeset-bot bot commented Sep 9, 2025

🦋 Changeset detected

Latest commit: bc93c9c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@llamaindex/chat-ui Patch
web Patch
@llamaindex/dynamic-ui Patch
@llamaindex/server Patch
llamaindex-server-examples Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
chat-ui-web Ready Ready Preview Comment Sep 9, 2025 11:40am

return (
<form
onSubmit={handleSubmit}
{...formProps}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

order matters, so I added the pass-through props after onSubmit so if you really know what you're doing, you can override the default behavior. cn + props.className is already a way to override the default, so I placed it after

name="input"
placeholder={props.placeholder ?? 'Type a message...'}
spellCheck={false}
{...textareaProps}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the defaults above the pass-through props, and the things that should not be overridden (or can already be overridden, like placeholder and className) below

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.

1 participant