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
Grid editor keeps stacking bindings for columns #11722
Comments
Thanks for the report. This behavior is intentional. Grid has been implemented in the way that Binder is decoupled as much as possible. Grid is using Binder only when populating the Editor, nothing else. So it is left for application developer to configure the Binder as well as symmetrically dismantling it if needed. e.g. developer can use removeBinding(..) to remove the binding when removing the column. Also removal and re-adding columns is in most cases un-necessary since you can programmatically hide them too, which is lighter operation. It depends on the application what is more appropriate of course. |
* Added note in JavaDoc of removeColumn #11722 * Merge branch 'master' into fix11722 * Merge branch 'master' into fix11722
* Added note in JavaDoc of removeColumn #11722 * Merge branch 'master' into fix11722 * Merge branch 'master' into fix11722
* Added note in JavaDoc of removeColumn #11722 * Merge branch 'master' into fix11722 * Merge branch 'master' into fix11722
Description of the bug
Grid doesn't remove the bindings when the related column is removed or a new binding is set for a column. It just keeps stacking bindings, and all their validators are run when the editor validation is run
Minimal reproducible example
This project contains a minimal reproducible example:
grid-editor.zip
With the control buttons, various conflicting bindings can be added for the "first name" column. After adding an additional binding, or removing the column and then adding it again with a new binding, all binders/validators are executed for the column.
Expected behavior
Grid removes the bindings when a related column is removed or if a new binding is set for the column.
Actual behavior
Grid doesn't remove the bindings when the related column is removed or a new binding is set for a column.
Details
Vaadin Framework version 8.9.0 (probably happens in earlier versions as well)
The text was updated successfully, but these errors were encountered: