Skip to content

Refactor: Move defaults Serialization to ComponentColumn.toJSON #8956

@tobiu

Description

@tobiu

Goal

Consolidate the toJSON serialization logic for defaults into Neo.grid.column.Component to avoid code duplication in subclasses.

Scope

  1. Update src/grid/column/Component.mjs:
    • Modify toJSON to include defaults, using me.serializeConfig(me.defaults) if it exists.
  2. Update src/grid/column/Sparkline.mjs:
    • Remove the overridden toJSON method.
  3. Update src/grid/column/Progress.mjs:
    • Remove the overridden toJSON method.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions