LearnNewsExamplesServices
Frontmatter
id3698
titleNeo.getCmpTree()
stateClosed
labels
enhancement
assignees[]
createdAtDec 28, 2022, 1:54 PM
updatedAtJan 4, 2023, 9:33 PM
githubUrlhttps://github.com/neomjs/neo/issues/3698
authorDinkh
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 4, 2023, 9:33 PM

Neo.getCmpTree()

Closed v8.1.0 enhancement
Dinkh
Dinkh commented on Dec 28, 2022, 1:54 PM

The developer wants to be able to find the parent tree of an item.

@returns [item, parents...]

@examples

  • Neo.getCmpTree('button'); => string finds first item with id and parents
  • Neo.getCmpTree({ntype: button, text: 'foo'}) => object results in the first item that matches all key|values

This should be kind of a shortcut for Neo.manager.Component.getParents(). But we want to be able to hand over a ntype as string.

Dinkh added the enhancement label on Dec 28, 2022, 1:54 PM
Dinkh
Dinkh Jan 2, 2023, 8:45 PM

Currently in Code Review

You can use Neo.first to grab the component since 4.4.15. In Code Review is the component.getParents()

Neo.first('button').getParents()
Dinkh closed this issue on Jan 4, 2023, 9:33 PM