The error "TypeError: Cannot read property 'type' of undefined" is thrown
Some error should be thrown, but one that the developer can recognize and handle appropriately.
Your example of persisting state saves it in localStorage. Say my user saves the state on Monday, and by Tuesday, a column is removed, renamed, has a different type... I need to handle that user's deprecated saved state.
Hi Anna,
Generally when specifying a model that will be used by the components the fields in it should correspond to the fields used in the widgets. I examined the dojo and should say that the Filter configuration is not valid. Since it is using a field that is not available in the model.
With that said, if the scenario you have includes modifying the Model in such a way I would suggest adding a bit of additional logic before restoring the settings. Parse the options to JSON and compare the model definition that is stored to the one that is currently available. If they do not match - do not restore the state or prompt the users.
Regards,
Viktor Tachev
Progress Telerik