From e879abb43fd02fb7a097611e72846e6471eb43a7 Mon Sep 17 00:00:00 2001 From: Hein Date: Thu, 30 Oct 2025 14:37:53 +0200 Subject: [PATCH] Fixed api bug --- .../adaptors/GlidlerAPIAdaptorForGoLangv2.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx b/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx index b6a6e87..8a465a8 100644 --- a/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx +++ b/src/Gridler/components/adaptors/GlidlerAPIAdaptorForGoLangv2.tsx @@ -261,8 +261,12 @@ function _GlidlerAPIAdaptorForGoLangv2(props: GlidlerAPIAdaptorForG [props.url, props.authtoken, props.filter, props.options, getState, addError] ); - //Reset the loaded pages to new rules + //Reset the function in the store. useEffect(() => { + setState('useAPIQuery', useAPIQuery); + setState('askAPIRowNumber', askAPIRowNumber); + + //Reset the loaded pages to new rules loadPage(0, 'all').then(() => { const onChange = getState('onChange'); const getGridSelectedRows = getState('getGridSelectedRows'); @@ -271,12 +275,6 @@ function _GlidlerAPIAdaptorForGoLangv2(props: GlidlerAPIAdaptorForG onChange(buffers); } }); - }, [JSON.stringify(props.options), props.filter, props.url, props.authtoken]); - - //Reset the function in the store. - useEffect(() => { - setState('useAPIQuery', useAPIQuery); - setState('askAPIRowNumber', askAPIRowNumber); }, [props.url, props.authtoken, props.filter, JSON.stringify(props.options), mounted, setState]); return <>;