File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,6 @@ export function ColorHelper() {
7070 const [ color , setColor ] = useState < SearchProps [ "color" ] > ( undefined ) ;
7171 const [ usage , setUsage ] = useState < SearchProps [ "usage" ] > ( undefined ) ;
7272
73- const [ , startTransition ] = useTransition ( ) ;
74-
7573 const updateSearch = ( ) => {
7674 setFilteredColorDecisionAndCorrespondingOption (
7775 fzf
@@ -92,12 +90,16 @@ export function ColorHelper() {
9290 ) ;
9391 } ;
9492
95- useEffectOnValueChange ( ( ) => {
96- startTransition ( ( ) => updateSearch ( ) ) ;
97- } , [ context , color , usage ] ) ;
98-
9993 useDebounce ( updateSearch , [ search ] ) ;
10094
95+ {
96+ const [ , startTransition ] = useTransition ( ) ;
97+
98+ useEffectOnValueChange ( ( ) => {
99+ startTransition ( ( ) => updateSearch ( ) ) ;
100+ } , [ context , color , usage ] ) ;
101+ }
102+
101103 const { css } = useStyles ( ) ;
102104
103105 const evtSearchAction = useConst ( ( ) => Evt . create < "scroll to" > ( ) ) ;
You can’t perform that action at this time.
0 commit comments