From 2307035717c7297634010a49368960368b72a860 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 30 Oct 2025 12:00:22 +0700 Subject: [PATCH] feat(FE-Storyless): add custom control component to SelectInput for adornment support --- src/components/input/SelectInput.tsx | 92 +++++++++++++++++----------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/src/components/input/SelectInput.tsx b/src/components/input/SelectInput.tsx index f3eca7d1..d37dcab4 100644 --- a/src/components/input/SelectInput.tsx +++ b/src/components/input/SelectInput.tsx @@ -9,6 +9,8 @@ import Select, { InputActionMeta, MultiValue, SingleValue, + components as ReactSelectComponents, + ControlProps, } from 'react-select'; import CreatableSelect from 'react-select/creatable'; import makeAnimated from 'react-select/animated'; @@ -64,6 +66,33 @@ interface SelectInputProps extends SelectInputBaseProps { const animatedComponents = makeAnimated(); +const CustomControl = < + Option, + IsMulti extends boolean, + Group extends GroupBase