mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Bugfix :: Sort event fired on sort removal (#4542)
* onsort applied on sort removal * bugcheck * removing unused toast
This commit is contained in:
parent
7dbf0d5022
commit
50be9d34a3
1 changed files with 3 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ import { IconEyeOff } from '@tabler/icons';
|
|||
import * as XLSX from 'xlsx/xlsx.mjs';
|
||||
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
|
||||
import Popover from 'react-bootstrap/Popover';
|
||||
import { useMounted } from '@/_hooks/use-mount';
|
||||
|
||||
export function Table({
|
||||
id,
|
||||
|
|
@ -113,6 +114,7 @@ export function Table({
|
|||
const [hoverAdded, setHoverAdded] = useState(false);
|
||||
const mergeToTableDetails = (payload) => dispatch(reducerActions.mergeToTableDetails(payload));
|
||||
const mergeToFilterDetails = (payload) => dispatch(reducerActions.mergeToFilterDetails(payload));
|
||||
const mounted = useMounted();
|
||||
|
||||
useEffect(() => {
|
||||
setExposedVariable(
|
||||
|
|
@ -440,9 +442,8 @@ export function Table({
|
|||
useEffect(() => {
|
||||
if (!sortOptions) {
|
||||
setExposedVariable('sortApplied', []);
|
||||
return;
|
||||
}
|
||||
setExposedVariable('sortApplied', sortOptions).then(() => fireEvent('onSort'));
|
||||
if (mounted) setExposedVariable('sortApplied', sortOptions).then(() => fireEvent('onSort'));
|
||||
}, [sortOptions]);
|
||||
|
||||
registerAction(
|
||||
|
|
|
|||
Loading…
Reference in a new issue