You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume you have an object with number fields in it.
When you use this object as source for the smart table and enable inline editing, the following can be observed:
when you edit a value, it will be overwritten with a new value of type string
when you open the inline editor and immediately accept without making changes, the values will be left unchanged and keep their type
The consequence is that application code can never be sure what type the values actually have after editing.
The same is true btw. for null or undefined values. When you don't change anything, the original value remains untouched, keeping a possible null or undefined type. But if you touched the editor and for example entered some text and the remove the text again, the previous null value will be overwritten with an empty string.
So in other words: when the type of a column is T, the type of the data in a particular row (!) must be assumed as T | string. This is particularly relevant when you are doing some validation in the (confirmEdit) event handler.
The text was updated successfully, but these errors were encountered:
Assume you have an object with number fields in it.
When you use this object as source for the smart table and enable inline editing, the following can be observed:
The consequence is that application code can never be sure what type the values actually have after editing.
The same is true btw. for null or undefined values. When you don't change anything, the original value remains untouched, keeping a possible null or undefined type. But if you touched the editor and for example entered some text and the remove the text again, the previous null value will be overwritten with an empty string.
So in other words: when the type of a column is
T
, the type of the data in a particular row (!) must be assumed asT | string
. This is particularly relevant when you are doing some validation in the(confirmEdit)
event handler.The text was updated successfully, but these errors were encountered: