Frontmatter
| id | 9405 |
| title | Create `Neo.data.TreeModel` |
| state | Closed |
| labels | enhancementaicore |
| assignees | tobiu |
| createdAt | Mar 9, 2026, 11:43 AM |
| updatedAt | Mar 9, 2026, 1:47 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9405 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | 9404 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 9, 2026, 1:47 PM |
Create Neo.data.TreeModel
tobiu added parent issue #9404 on Mar 9, 2026, 11:44 AM
tobiu assigned to @tobiu on Mar 9, 2026, 12:10 PM

tobiu
Mar 9, 2026, 1:47 PM
Input from Gemini 3.1 Pro:
✦ Implemented
Neo.data.TreeModelto serve as the default schema for hierarchical data.
- Switched from
expandedtocollapsedto maintain consistency with existing tree models in the framework.parentIdis defined as a nullableStringto easily map to the externalkeyProperty(id), distinct from the internalNeo.data.RecordinternalId.Changes are pushed to
dev.

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
Goal
Create a dedicated
Neo.data.Modelsubclass for hierarchical data structures.Details
src/data/TreeModel.mjsNeo.data.ModelparentId(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.