From 57d6445497e8d9b63f2e0cc8e05f237cc985cb06 Mon Sep 17 00:00:00 2001 From: Nihaal Sangha Date: Sun, 28 Mar 2021 19:17:35 +0100 Subject: [PATCH] Add itemToString to MultiSelect This fixes a flash of `[object Object]` before the input is cleared after selecting an item --- thunderstore-components/src/components/Select.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/thunderstore-components/src/components/Select.tsx b/thunderstore-components/src/components/Select.tsx index 42de06fd7..3259743d4 100644 --- a/thunderstore-components/src/components/Select.tsx +++ b/thunderstore-components/src/components/Select.tsx @@ -154,6 +154,7 @@ export const MultiSelect = ({ defaultHighlightedIndex: 0, selectedItem: null, items: filteredOptions, + itemToString: (option) => option?.label || "", stateReducer: (_, actionAndChanges) => { const { changes, type } = actionAndChanges; switch (type) {