LearnNewsExamplesServices
Frontmatter
id9405
titleCreate `Neo.data.TreeModel`
stateClosed
labels
enhancementaicore
assigneestobiu
createdAtMar 9, 2026, 11:43 AM
updatedAtMar 9, 2026, 1:47 PM
githubUrlhttps://github.com/neomjs/neo/issues/9405
authortobiu
commentsCount2
parentIssue9404
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 9, 2026, 1:47 PM

Create Neo.data.TreeModel

Closed v12.1.0 enhancementaicore
tobiu
tobiu commented on Mar 9, 2026, 11:43 AM

Goal

Create a dedicated Neo.data.Model subclass for hierarchical data structures.

Details

  • Location: src/data/TreeModel.mjs
  • Extends: Neo.data.Model
  • Required Fields:
    • parentId (Type: String/Integer, nullable)
    • isLeaf (Type: Boolean, defaultValue: true)
    • expanded (Type: Boolean, defaultValue: false) - Tracks UI state.
    • depth (Type: Integer, defaultValue: 0) - Tracks level in the hierarchy for visual indentation.
tobiu added the enhancement label on Mar 9, 2026, 11:43 AM
tobiu added the ai label on Mar 9, 2026, 11:43 AM
tobiu added the core label on Mar 9, 2026, 11:43 AM
tobiu added parent issue #9404 on Mar 9, 2026, 11:44 AM
tobiu assigned to @tobiu on Mar 9, 2026, 12:10 PM
tobiu referenced in commit 0daf160 - "feat: Add Neo.data.TreeModel (#9405) on Mar 9, 2026, 1:47 PM
tobiu
tobiu Mar 9, 2026, 1:47 PM

Input from Gemini 3.1 Pro:

✦ Implemented Neo.data.TreeModel to serve as the default schema for hierarchical data.

  • Switched from expanded to collapsed to maintain consistency with existing tree models in the framework.
  • parentId is defined as a nullable String to easily map to the external keyProperty (id), distinct from the internal Neo.data.Record internalId.

Changes are pushed to dev.

tobiu
tobiu Mar 9, 2026, 1:47 PM

Implemented Neo.data.TreeModel. Pushed to dev.

tobiu closed this issue on Mar 9, 2026, 1:47 PM