-
-
Notifications
You must be signed in to change notification settings - Fork 202
Refactor: Move defaults Serialization to ComponentColumn.toJSON #8956
Copy link
Copy link
Closed
Labels
Description
Goal
Consolidate the toJSON serialization logic for defaults into Neo.grid.column.Component to avoid code duplication in subclasses.
Scope
- Update
src/grid/column/Component.mjs:- Modify
toJSONto includedefaults, usingme.serializeConfig(me.defaults)if it exists.
- Modify
- Update
src/grid/column/Sparkline.mjs:- Remove the overridden
toJSONmethod.
- Remove the overridden
- Update
src/grid/column/Progress.mjs:- Remove the overridden
toJSONmethod.
- Remove the overridden
Motivation
Both Sparkline and Progress columns override toJSON solely to serialize the defaults config. Moving this to the base class Neo.grid.column.Component DRYs up the code and ensures all component columns serialize correctly by default.
Reactions are currently unavailable