Skip to content

Commit

Permalink
chore: pass search pad tokens as is
Browse files Browse the repository at this point in the history
The `search-pad` is now compatible with the new syntax.
  • Loading branch information
nikku committed Nov 1, 2024
1 parent 8819365 commit 595641d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/features/search/BpmnSearchProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@ BpmnSearchProvider.prototype.find = function(pattern) {
*/
function toSearchPadResult(result) {

/**
* @param {SearchToken} token
*
* @return {SearchPadToken}
*/
function toSearchPadToken(token) {
return {
[ token.match ? 'matched' : 'normal' ]: token.value
};
}

const {
item: {
element
Expand All @@ -99,7 +88,7 @@ function toSearchPadResult(result) {

return {
element,
primaryTokens: map(tokens.label, toSearchPadToken),
secondaryTokens: map(tokens.id, toSearchPadToken)
primaryTokens: tokens.label,
secondaryTokens: tokens.id
};
}

0 comments on commit 595641d

Please sign in to comment.