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

Make DefaultHandler plugin remount persistent #111

Closed
elbakerino opened this issue Mar 28, 2021 · 1 comment
Closed

Make DefaultHandler plugin remount persistent #111

elbakerino opened this issue Mar 28, 2021 · 1 comment
Labels
Projects
Milestone

Comments

@elbakerino
Copy link
Member

elbakerino commented Mar 28, 2021

Make DefaultHandler plugin remount persistent, e.g. currently when an string schema has a default and it switches in isVirtual, the default value will be added again for e.g. number fields with an empty string / that where deleted by deleteOnEmpty.

May need another scope inside the store, can not be added to internal.

There should be an option, when a generator is used to "update data", to not apply default again - as default should maybe be done only at "create data".

Could be done together with #112

@elbakerino
Copy link
Member Author

  • added defaultHandled to Store.internals, from per-handler-state
  • now remount persistent
  • added prop doNotDefault to PluginProps, if doNotDefault is true no defaults are applied
  • add readOnly support to default handling Fix readOnly and default handling #117

! todo: doNotDefault should/must respect "do-default" on e.g. new GenericList entries

ui-schema automation moved this from To do to Done Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
ui-schema
  
Done
Development

No branches or pull requests

1 participant