rename tableOrdersAtom to tableSortsAtom

This commit is contained in:
Sidney Alcantara
2022-06-13 23:10:15 +10:00
parent c75168e030
commit 028ab2fa13
12 changed files with 57 additions and 57 deletions

View File

@@ -25,7 +25,7 @@ import {
tableScope,
tableSettingsAtom,
tableFiltersAtom,
tableOrdersAtom,
tableSortsAtom,
addRowAtom,
} from "@src/atoms/tableScope";
@@ -33,7 +33,7 @@ export default function AddRow() {
const [userRoles] = useAtom(userRolesAtom, globalScope);
const [tableSettings] = useAtom(tableSettingsAtom, tableScope);
const [tableFilters] = useAtom(tableFiltersAtom, tableScope);
const [tableOrders] = useAtom(tableOrdersAtom, tableScope);
const [tableSorts] = useAtom(tableSortsAtom, tableScope);
const addRow = useSetAtom(addRowAtom, tableScope);
const [idType, setIdType] = useAtom(tableAddRowIdTypeAtom, globalScope);
@@ -41,7 +41,7 @@ export default function AddRow() {
const [open, setOpen] = useState(false);
const [openIdModal, setOpenIdModal] = useState(false);
const forceRandomId = tableFilters.length > 0 || tableOrders.length > 0;
const forceRandomId = tableFilters.length > 0 || tableSorts.length > 0;
const handleClick = () => {
if (idType === "random" || (forceRandomId && idType === "decrement")) {