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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models config should allow overwriting defaults, specifically for Select + Combobox #2616

Open
mannycarrera4 opened this issue Feb 27, 2024 · 0 comments
Labels
10.x enhancement New feature or request

Comments

@mannycarrera4
Copy link
Contributor

mannycarrera4 commented Feb 27, 2024

馃悰 Bug Report

Select should allow to overwrite the selection manager so that consumers can reset the select to a non selected state. Currently, once you select an item, there's no way to reset the value of the select. In order for us to do this, we'll need to update models.ts so that configs are merge properly and whatever the consumer passes overwrites the default config.

  • Automatic controllable state. If you provide the state value in config, it will be used, otherwise initial* will be used for initial value. This would probably be a breaking change since any state would automatically become config options and there may be config clashes.
  • Access to model config.
  • Subscribe to events after model creation to avoid having to use useEffect in elemProps hooks to track state changes since there's no access to direct model events. Something like useModelCallback(model, 'eventName', (data) => {}) and possibly a guard subscription useModelGuard(model, 'eventName', data => true).
@mannycarrera4 mannycarrera4 added bug Something isn't working 10.x labels Feb 27, 2024
@alanbsmith alanbsmith changed the title Models config should allow to overwrite defaults, specifically for Select + Combobox Models config should allow overwriting defaults, specifically for Select + Combobox Apr 9, 2024
@myvuuu myvuuu added enhancement New feature or request and removed bug Something isn't working labels Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.x enhancement New feature or request
Projects
Status: 馃搵 To Do
Development

No branches or pull requests

3 participants