Skip to content
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

Allow Uncontrolled Components #11232

Open
vixalien opened this issue Nov 25, 2023 · 6 comments
Open

Allow Uncontrolled Components #11232

vixalien opened this issue Nov 25, 2023 · 6 comments

Comments

@vixalien
Copy link

vixalien commented Nov 25, 2023

Feature request summary

Components like TextField and Select only work when they are controlled, i.e. they need the properties value and onChange be set so that their state can be managed by javascript code.

Rationale

By allowing form inputs to be uncontrolled, we could eliminate those props and ensure Polaris Forms works without JavaScript. This is particularly important in Remix, where the browser should be delegated to do everything it can and use JS when necessary.


🌟 Feature requests that are not yet planned will be closed. We then use the issue’s 👍 upvotes to track and set priorities. See the contribution guidelines for more information.

@davidhousedev
Copy link

Another dimension to this is compatibility with the App Bridge components. For example, the Contextual Save Bar relies on native HTML for events and states in order to work properly, but it's challenging to emulate the required events when you're using controlled inputs.

Being able to use uncontrolled inputs would ensure that all native DOM events get sent by-default.

@mkromann
Copy link

mkromann commented Apr 9, 2024

This would be lovely — especially considering that Remix is such a breeze with uncontrolled components.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

@vixalien
Copy link
Author

vixalien commented Oct 7, 2024 via email

@grundmanise
Copy link

Agree. I don't see a reason why they should be controlled components only.

@JannikWempe
Copy link

This should have a high prio after Remix has become the standard.

Remix works very well with uncontrolled components and common libraries like conform rely on them.

Adding support for uncontrolled inputs would make development a lot easier.

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

No branches or pull requests

6 participants