From 54d16f52bc6b8ae7647e1a0a71b01933768ddd5b Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Mon, 5 Aug 2024 12:57:57 +0800 Subject: [PATCH] fix: disable select when not select field --- src/components/filter-sphere.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/filter-sphere.tsx b/src/components/filter-sphere.tsx index c45f9b0..06bbaf1 100644 --- a/src/components/filter-sphere.tsx +++ b/src/components/filter-sphere.tsx @@ -53,7 +53,7 @@ const componentsSpec = { ); return ; }, - Select: ({ value, onChange, options = [] }) => { + Select: ({ value, onChange, options = [], className, disabled }) => { const selectedIdx = options.findIndex((option) => option.value === value); const handleChange = useCallback( (value: string) => { @@ -63,9 +63,13 @@ const componentsSpec = { [options, onChange], ); return ( - - + {options?.map((option, index) => (