hi-tm 0.14.2 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,7 @@ const ModernTable = ({ rows = [], onEdit, loadingProps = {
|
|
|
35
35
|
isLoading: false,
|
|
36
36
|
loadingText: "درحال دریافت اطلاعات",
|
|
37
37
|
loadingIcon: react_1.default.createElement(Loader, null),
|
|
38
|
-
}, onView, onAction, selectable, onSelectionChange, actions, ShowActionModal = true, modalActions, noItemFoundProps, selectedItems = [], iconsSRC,
|
|
38
|
+
}, onView, onAction, selectable, onSelectionChange, checkBoxDisable, actions, ShowActionModal = true, modalActions, noItemFoundProps, selectedItems = [], iconsSRC,
|
|
39
39
|
// Child row configuration with defaults
|
|
40
40
|
childRowConfig = {
|
|
41
41
|
expandByDefault: false,
|
|
@@ -547,7 +547,7 @@ pageIndex = 0, // Default to first page (0-indexed)
|
|
|
547
547
|
if (el) {
|
|
548
548
|
el.indeterminate = isIndeterminate(row.id);
|
|
549
549
|
}
|
|
550
|
-
} })))),
|
|
550
|
+
}, disabled: checkBoxDisable })))),
|
|
551
551
|
react_1.default.createElement("div", { className: "flex-1 min-w-0" },
|
|
552
552
|
react_1.default.createElement("div", { className: "flex items-start justify-between" },
|
|
553
553
|
react_1.default.createElement("div", { className: "overflow-hidden" },
|
|
@@ -631,7 +631,7 @@ pageIndex = 0, // Default to first page (0-indexed)
|
|
|
631
631
|
if (el) {
|
|
632
632
|
el.indeterminate = isIndeterminate(row.id);
|
|
633
633
|
}
|
|
634
|
-
} }),
|
|
634
|
+
}, disabled: checkBoxDisable }),
|
|
635
635
|
isIndeterminate(row.id) ? (react_1.default.createElement("div", { className: "pointer-events-none absolute left-[5px] top-[9px] w-2.5 h-0.5 bg-blue-500" })) : (react_1.default.createElement("svg", { className: "pointer-events-none absolute left-[5px] top-[5px] h-2.5 w-2.5 fill-white opacity-0 transition-opacity peer-checked:opacity-100", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
636
636
|
react_1.default.createElement("path", { d: "M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" }))))))),
|
|
637
637
|
row?.data?.map((item, colIndex) => (react_1.default.createElement("div", { key: `${item.id}-${colIndex}`, className: `h-full select-none text-xs font-medium min-w-0 flex items-center ${item.type === "avatar" ||
|
|
@@ -656,7 +656,7 @@ pageIndex = 0, // Default to first page (0-indexed)
|
|
|
656
656
|
if (el) {
|
|
657
657
|
el.indeterminate = isIndeterminate(row.id);
|
|
658
658
|
}
|
|
659
|
-
} }),
|
|
659
|
+
}, disabled: checkBoxDisable }),
|
|
660
660
|
isIndeterminate(row.id) ? (react_1.default.createElement("div", { className: "pointer-events-none absolute left-[5px] top-[9px] w-2.5 h-0.5 bg-blue-500" })) : (react_1.default.createElement("svg", { className: "pointer-events-none absolute left-[5px] top-[5px] h-2.5 w-2.5 fill-white opacity-0 transition-opacity peer-checked:opacity-100", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
661
661
|
react_1.default.createElement("path", { d: "M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" })))))),
|
|
662
662
|
renderCellContent(item)))),
|
|
@@ -72,6 +72,7 @@ export interface ModernTableProps {
|
|
|
72
72
|
onAction?: (actionId: number, rowId: number) => void;
|
|
73
73
|
selectable: boolean;
|
|
74
74
|
onSelectionChange?: (id: number | number[]) => void;
|
|
75
|
+
checkBoxDisable?: boolean;
|
|
75
76
|
actions?: boolean;
|
|
76
77
|
ShowActionModal?: boolean;
|
|
77
78
|
modalActions: ModalAction[] | ((row: TableRowData) => ModalAction[]);
|