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
cellEdited is triggered when data type changes #4450
Comments
If you use a number editor the type won't change |
Ok - I just thought that since it threw me off for a little while, some explanation in the documentation would be helpful (since it looks like cellEdited is being triggered when there is no change). If it's not worth noting the docs, this issue could be closed. |
Fair point, I can certainly include some details in the docs |
Website Page
https://tabulator.info/docs/6.2/events#edit
Describe the issue
When data is pre-populated with the "data" element, if a JS Number is set on a text field, the cellEdited event is triggered because Tabulator changes the value to the type that matches the column definition.
1 === '1'
isfalse
, so the data changed. If the formatter is set to money (which think should be changed to "Number" or a "Number" formatter should be added, but that's another thought :)) or if the data provided to Tabulator is a string, the cellEdited event doesn't trigger, which is as expected.The documentation should mention that cellEdited uses strict type checking to determine if a value changed.
https://jsfiddle.net/splemp/fbq63knd/
The text was updated successfully, but these errors were encountered: