Skip to content

Commit

Permalink
Update to sort the options in the dropdown based on Text
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsMinnee committed Mar 15, 2021
1 parent 9c76881 commit 53a87b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NNDropdown/operations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export async function _getAvailableOptions(context: ComponentFramework.Context<I
allOptions.push(item);
});

allOptions.sort((a,b) => (a.text > b.text) ? 1 : ((b.text > a.text) ? -1 : 0))

return allOptions;
}

Expand Down

0 comments on commit 53a87b9

Please sign in to comment.