LearnNewsExamplesServices
Frontmatter
id3696
titleNeo.first()
stateClosed
labels
enhancement
assignees[]
createdAtDec 28, 2022, 1:29 PM
updatedAtJan 2, 2023, 8:41 PM
githubUrlhttps://github.com/neomjs/neo/issues/3696
authorDinkh
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 2, 2023, 8:41 PM

Neo.first()

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

The developer wants to be able to find the first component with certain stats.

@examples Neo.first('button'); => string finds first item with ntype Neo.first({ntype: button, text: 'foo'}) => object result is the first item that matches all key|values

This should be kind of a shortcut for Neo.manager.Component.find(). We only want to return the first item (not an array) and be able to hand over a ntype as string.

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

Done in 4.4.15

Dinkh closed this issue on Jan 2, 2023, 8:41 PM