fix(Gridler): improve height and width fallback logic
This commit is contained in:
@@ -166,7 +166,7 @@ export const GridlerDataGrid = () => {
|
|||||||
columns={(renderColumns as Array<GridColumn>) ?? []}
|
columns={(renderColumns as Array<GridColumn>) ?? []}
|
||||||
columnSelect="none"
|
columnSelect="none"
|
||||||
drawFocusRing
|
drawFocusRing
|
||||||
height={height ?? 400}
|
height={height || 400}
|
||||||
overscrollX={16}
|
overscrollX={16}
|
||||||
overscrollY={32}
|
overscrollY={32}
|
||||||
rangeSelect={allowMultiSelect ? 'multi-rect' : 'cell'}
|
rangeSelect={allowMultiSelect ? 'multi-rect' : 'cell'}
|
||||||
@@ -284,7 +284,7 @@ export const GridlerDataGrid = () => {
|
|||||||
|
|
||||||
rows={total_rows ?? 0}
|
rows={total_rows ?? 0}
|
||||||
theme={theme.gridTheme}
|
theme={theme.gridTheme}
|
||||||
width={width ?? 200}
|
width={width || 200}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -244,6 +244,7 @@ export const Computer = React.memo(() => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (refFirstRun.current > 0) {
|
if (refFirstRun.current > 0) {
|
||||||
|
getState('refreshCells')?.();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
refFirstRun.current = 1;
|
refFirstRun.current = 1;
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
|||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
[props.url, props.authtoken, props.filter, props.options, getState, addError]
|
[props.url, props.authtoken, props.filter, JSON.stringify(props.options), getState, addError]
|
||||||
);
|
);
|
||||||
|
|
||||||
//Reset the function in the store.
|
//Reset the function in the store.
|
||||||
|
|||||||
Reference in New Issue
Block a user