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

Custom Field value should be synchronised not only on change #7108

Open
jcgueriaud1 opened this issue Feb 11, 2025 · 2 comments
Open

Custom Field value should be synchronised not only on change #7108

jcgueriaud1 opened this issue Feb 11, 2025 · 2 comments
Labels
enhancement New feature or request waiting for author Further information is requested

Comments

@jcgueriaud1
Copy link
Contributor

Describe your motivation

When you're using a custom field the value is automatically updated on change.

It might work for certain cases but sometimes it needs to be synchronized on click (on a button) or eagerly.

In that case, the value event might useless or might cause extra communication.

Describe the solution you'd like

First be able to disable this behaviour (then the developer can manage it entirely) or switch the event to a different one. (I don't know if that would work with the event propagation).

Describe alternatives you've considered

No response

Additional context

No response

@yuriy-fix
Copy link
Contributor

Could you please provide use-cases on where you would like to have this behaviour, so we could consider required API?

@yuriy-fix yuriy-fix added the waiting for author Further information is requested label Feb 13, 2025
@jcgueriaud1
Copy link
Contributor Author

There are some examples here: https://vaadin.com/blog/creating-well-behaving-form-fields-using-customfield

For example:

  • if you want to create a field with a Map to select a position on click. on change is not useful.
  • a Grid Field with a filter (the filter will fire the change event).
  • one textField with EAGER mode will also update the value on change, which seems wrong

If you're using a CustomField with an inner binder, the change event is very likely wrong (you want to update the value based on the Binder value change).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request waiting for author Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants