application icon indicating copy to clipboard operation
application copied to clipboard

ComponentReflection: saveState - unset instead of setting null

Open peldax opened this issue 5 years ago • 1 comments

  • bug fix
  • BC break? maybe, needs review

Save state methods removes parameter entirely when parameter value matches default value.

In current version, parameter value is set to null, browser than receives empty value, which is not intended.

peldax avatar Jan 25 '20 01:01 peldax

For example: My datagrid has persistent $page with default value 1. SaveState nulls the value on first page. My javascript remembers state recieved by nette and sends it back on next request, which results on error.

I believe null is state on it own, now even more than before with typed properties and its "unset" state.

peldax avatar Jan 25 '20 02:01 peldax