mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge pull request #11117 from ToolJet/fix-refactor-focus-copy-paste
Fix table going into infinite render when placed inside form
This commit is contained in:
commit
bf8fd0f861
1 changed files with 1 additions and 13 deletions
|
|
@ -171,7 +171,7 @@ export const Table = React.memo(
|
|||
});
|
||||
}, [JSON.stringify(tableDetails?.filterDetails?.filters)]);
|
||||
|
||||
useEffect(() => mergeToTableDetails({ columnProperties: properties?.columns }), [properties]);
|
||||
useEffect(() => mergeToTableDetails({ columnProperties: properties?.columns }), [properties?.columns]);
|
||||
|
||||
useEffect(() => {
|
||||
const hoverEvent = tableEvents?.find(({ event }) => {
|
||||
|
|
@ -860,12 +860,6 @@ export const Table = React.memo(
|
|||
if (preSelectRow.current) {
|
||||
preSelectRow.current = false;
|
||||
} else {
|
||||
// onComponentOptionsChanged(component, [
|
||||
// ['currentPageData', pageData],
|
||||
// ['currentData', data],
|
||||
// ['selectedRow', []],
|
||||
// ['selectedRowId', null],
|
||||
// ]);
|
||||
setExposedVariables({
|
||||
currentPageData: pageData,
|
||||
currentData: data,
|
||||
|
|
@ -974,12 +968,6 @@ export const Table = React.memo(
|
|||
});
|
||||
}, [JSON.stringify(tableDetails.selectedRowsDetails)]);
|
||||
|
||||
const pageData = page.map((row) => row.original);
|
||||
|
||||
useEffect(() => {
|
||||
setExposedVariables({ currentPageData: pageData });
|
||||
}, [pageData]);
|
||||
|
||||
useEffect(() => {
|
||||
setExposedVariables({ dataUpdates: tableDetails.dataUpdates || [] });
|
||||
}, [JSON.stringify(tableDetails.dataUpdates)]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue