-
Notifications
You must be signed in to change notification settings - Fork 100
Bindable TextInput value #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bindable TextInput value #2107
Conversation
🦋 Changeset detectedLatest commit: a5887d6 The changes in this PR will be included in the next version bump. 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 |
✅ Deploy Preview for stacks-svelte ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
giamir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @chris-doucette-stack. I am ok to see this merged. The only thing that would be nice to have is to add a unit test case if it is not too complicated.
@dancormier and I recently discussed supporting both two-way and one-way binding for the RadioGroup and Checkbox components, so this PR comes at the right time. It brings TextInput in line with what we’re aiming to do across the rest of the form components.
I will let Dan chime in as well but apart from that small test case I don't see why we could not merge this in an express way.
Don't forget to add a changeset (run npx changeset in your terminal and follow the instructions) for the PR @chris-doucette-stack so that our pipelines will automatically create a new release for you once merged. Thank you
dancormier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giamir's comment pretty much matches my thoughts. Seems like a nice enhancement (and one that we're working on getting in for other inputs). Besides the changeset, I think this is good to get merged.
Thanks for the contribution @chris-doucette-stack ❤️
Summary
This PR explicitly declares a value prop on TextInput and makes it bindable, I also added a Storybook story, mainly for testing purposes
How to test