Fixed the refresh bug
This commit is contained in:
@@ -19,13 +19,12 @@ export interface GlidlerAPIAdaptorForGoLangv2Props<T = unknown> extends APIOptio
|
||||
}
|
||||
|
||||
function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForGoLangv2Props<T>) {
|
||||
const [setStateFN, setState, getState, addError, mounted, loadPage] = useGridlerStore((s) => [
|
||||
const [setStateFN, setState, getState, addError, mounted] = useGridlerStore((s) => [
|
||||
s.setStateFN,
|
||||
s.setState,
|
||||
s.getState,
|
||||
s.addError,
|
||||
s.mounted,
|
||||
s.loadPage,
|
||||
]);
|
||||
|
||||
const useAPIQuery: (index: number) => Promise<any> = useCallback(
|
||||
@@ -266,8 +265,10 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
setState('useAPIQuery', useAPIQuery);
|
||||
setState('askAPIRowNumber', askAPIRowNumber);
|
||||
|
||||
const _refresh = getState('_refresh');
|
||||
|
||||
//Reset the loaded pages to new rules
|
||||
loadPage(0, 'all').then(() => {
|
||||
_refresh?.().then(() => {
|
||||
const onChange = getState('onChange');
|
||||
const getGridSelectedRows = getState('getGridSelectedRows');
|
||||
if (onChange && typeof onChange === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user