aq-fe-framework 0.1.950 → 0.1.951
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.
- package/dist/{IRole-DxlO6AaZ.d.mts → IRole-1eK_ZKKs.d.mts} +1 -1
- package/dist/{MyDataTable-DJPTFEIG.d.mts → MyDataTable-CEmOxCew.d.mts} +1 -1
- package/dist/{chunk-K57NM5ZE.mjs → chunk-KLRJA477.mjs} +5 -3
- package/dist/{chunk-4EBKHU7Z.mjs → chunk-TUMZDI5F.mjs} +9371 -9375
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +11 -11
- package/dist/const/index.mjs +1 -1
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.mjs +11 -11
- package/dist/hooks/index.d.mts +4 -4
- package/dist/hooks/index.mjs +2 -2
- package/dist/interfaces/index.d.mts +1 -1
- package/dist/modules-features/index.d.mts +1 -1
- package/dist/modules-features/index.mjs +5 -5
- package/dist/shared/index.mjs +6 -6
- package/package.json +1 -1
- package/dist/{chunk-SPG47QW7.mjs → chunk-4IP2EYUM.mjs} +1 -1
|
@@ -57,4 +57,4 @@ interface IRole extends IBaseEntity {
|
|
|
57
57
|
aqModuleId?: number;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export type { AcademicYearUpdateDto as A, IAcademicYear as I,
|
|
60
|
+
export type { AcademicYearUpdateDto as A, IAcademicYear as I, IEmailConfig as a, IEmailTemplate as b, IRole as c };
|
|
@@ -50,4 +50,4 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
|
|
|
50
50
|
}
|
|
51
51
|
declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, renderTopToolbarCustomActions, visibleFields, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
52
52
|
|
|
53
|
-
export {
|
|
53
|
+
export { type MyActionIconProps as M, type PaginationState as P, type MyButtonProps as a, type MyButtonModalProps as b, type MyDataTableProps as c, MyActionIcon as d, MyButton as e, MyButtonModal as f, type MyDataTableInternalProps as g, MyDataTable as h };
|
|
@@ -8,11 +8,14 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/hooks/useEditableRows.ts
|
|
10
10
|
import { useState } from "react";
|
|
11
|
-
function useEditableRows() {
|
|
11
|
+
function useEditableRows(config) {
|
|
12
|
+
const { keyField = "id" } = config;
|
|
12
13
|
const [editedRows, setEditedRows] = useState([]);
|
|
13
14
|
const handleFieldChange = (row, field, value) => {
|
|
14
15
|
setEditedRows((prev) => {
|
|
15
|
-
const existingIndex = prev.findIndex(
|
|
16
|
+
const existingIndex = prev.findIndex(
|
|
17
|
+
(item) => item[keyField] === row[keyField]
|
|
18
|
+
);
|
|
16
19
|
let updatedRow;
|
|
17
20
|
if (existingIndex !== -1) {
|
|
18
21
|
updatedRow = __spreadProps(__spreadValues({}, prev[existingIndex]), { [field]: value });
|
|
@@ -29,7 +32,6 @@ function useEditableRows() {
|
|
|
29
32
|
editedRows,
|
|
30
33
|
handleFieldChange,
|
|
31
34
|
setEditedRows
|
|
32
|
-
// 👉 expose ra ngoài để có thể set thủ công
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
|