mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 15:34:26 +01:00
Use type label if suggestion doesn't provide one
This commit is contained in:
@@ -486,6 +486,9 @@ RED.typeSearch = (function() {
|
||||
i: suggestionItem.i,
|
||||
...suggestion
|
||||
}
|
||||
if (!suggestion.label && suggestion.nodes && suggestion.nodes.length === 1 && suggestion.nodes[0].type) {
|
||||
suggestedItem.label = getTypeLabel(suggestion.nodes[0].type, RED.nodes.getType(suggestion.nodes[0].type));
|
||||
}
|
||||
searchResults.editableList('addItem', suggestedItem);
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user