mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-data-viewer): double update on chunk size change
This commit is contained in:
@@ -75,7 +75,16 @@ export const TableFooter = observer(function TableFooter({
|
||||
}: TableFooterProps) {
|
||||
const ref = useRef<HTMLInputElement>(null);
|
||||
const handleChange = useCallback(
|
||||
() => ref.current && model.setChunkSize(parseInt(ref.current.value, 10)),
|
||||
() => {
|
||||
if (!ref.current) {
|
||||
return;
|
||||
}
|
||||
const value = parseInt(ref.current.value, 10);
|
||||
|
||||
if (model.getChunkSize() !== value) {
|
||||
model.setChunkSize(value);
|
||||
}
|
||||
},
|
||||
[model]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user