diff --git a/components/craft/fancy-multi-select.tsx b/components/craft/fancy-multi-select.tsx index 34e270d..5acf888 100644 --- a/components/craft/fancy-multi-select.tsx +++ b/components/craft/fancy-multi-select.tsx @@ -77,12 +77,12 @@ export function FancyMultiSelect() { } }, []); - const selectables = FRAMEWORKS.filter(framework => !selected.includes(framework)); + const selectables = FRAMEWORKS.filter(framework => !selected.find(s => s.value === framework.value)); return (
{selected.map((framework) => { @@ -119,32 +119,32 @@ export function FancyMultiSelect() { />
-
{open && selectables.length > 0 ? -
- - {selectables.map((framework) => { - return ( - { - e.preventDefault(); - e.stopPropagation(); - }} - onSelect={(value) => { - setInputValue("") - setSelected(prev => [...prev, framework]) - }} - className={"cursor-pointer"} - > - {framework.label} - - ); - })} - +
+
+ + {selectables.map((framework) => { + return ( + { + e.preventDefault(); + e.stopPropagation(); + }} + onSelect={() => { + setInputValue("") + setSelected(prev => [...prev, framework]) + }} + className={"cursor-pointer"} + > + {framework.label} + + ); + })} + +
: null} -
) }