react-table-edit 1.5.25 → 1.5.26
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/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40245,6 +40245,18 @@ const TableEdit = React$5.forwardRef((props, ref) => {
|
|
|
40245
40245
|
const toggleSidebar = React$5.useCallback(() => {
|
|
40246
40246
|
setOpenPopupSetupColumn((prev) => !prev);
|
|
40247
40247
|
}, []);
|
|
40248
|
+
const handleSetColumn = React$5.useCallback((newColumns) => {
|
|
40249
|
+
if (saveSettingColumn) {
|
|
40250
|
+
saveSettingColumn(newColumns.map((x, index) => ({
|
|
40251
|
+
field: x.field,
|
|
40252
|
+
headerText: x.headerDisplay,
|
|
40253
|
+
visible: x.visible,
|
|
40254
|
+
fixedType: x.fixedType,
|
|
40255
|
+
width: x.width,
|
|
40256
|
+
sortOrder: index + 1
|
|
40257
|
+
})));
|
|
40258
|
+
}
|
|
40259
|
+
}, [saveSettingColumn]);
|
|
40248
40260
|
return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-table-edit", children: [jsxRuntime.jsxs("div", { className: "r-grid", ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsx(TableComponent, { idTable: idTable, height: height, dataSource: dataSource, contentColumns: contentColumns, headerColumns: headerColumns, selectedRows: selectedRows, setSelectedRows: setSelectedRows, selectedCell: selectedCell, startCell: startCell, editCell: editCell, gridRef: gridRef, objHeaderWidthFixLeft: objHeaderWidthFixLeft, objHeaderWidthFixRight: objHeaderWidthFixRight, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, fisrtObjWidthFixRight: fisrtObjWidthFixRight, totalCount: totalCount, isMulti: isMulti, selectEnable: selectEnable, editDisable: editDisable, addDisable: addDisable, defaultValue: defaultValue, fieldKey: fieldKey, fieldUniKey: fieldUniKey, formatSetting: formatSetting, toolbarSetting: toolbarSetting, buttonSetting: buttonSetting, containerRef: containerRef, optionsFilter: optionsFilter, allowFiltering: allowFiltering, allowSorting: allowSorting, searchSetting: searchSetting, searchTerm: searchTerm, haveSum: haveSum, isCopying: isCopying, typeDragging: typeDragging, visibleContentColumns: visibleContentColumns, rowHeight: rowHeight, changeDataSource: changeDataSource, handleCommandClick: handleCommandClick, handleKeyDown: handleKeyDown, handeCopyCell: handeCopyCell, onDuplicate: onDuplicate, setSelectedCell: setSelectedCell, setStartCell: setStartCell, focusEditElementCell: focusEditElementCell, rowChange: rowChange, filterBy: filterBy, setFilterBy: setFilterBy, orderBy: orderBy, setOrderBy: setOrderBy, searchClient: searchClient, handleDataChange: handleDataChange, handleDuplicate: () => {
|
|
40249
40261
|
handleDuplicate(dataSource, startCell.row, fieldKey, defaultValue, fieldUniKey, changeDataSource, containerRef, totalCount, toolbarSetting, buttonSetting, editDisable, addDisable, onDuplicate);
|
|
40250
40262
|
}, setContentColumns: (newColumns) => {
|
|
@@ -40268,11 +40280,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
|
|
|
40268
40280
|
handleInsertBefore(dataSource, startCell.row, defaultValue, changeDataSource, toolbarSetting, buttonSetting, editDisable, addDisable);
|
|
40269
40281
|
}, handleDeleteAll: () => {
|
|
40270
40282
|
handleDeleteAll(t, messageBoxConfirmDelete, handleFocusCell, changeDataSource, editDisable, addDisable, toolbarSetting, buttonSetting);
|
|
40271
|
-
}, setOpenPopupSetupColumn: setOpenPopupSetupColumn, focusRow: startCell.row, editDisable: editDisable, addDisable: addDisable, buttonSetting: buttonSetting, toolbarSetting: toolbarSetting, headerColumns: headerColumns }))] }), pagingSetting?.allowPaging && (jsxRuntime.jsx(PagingComponent, { gridRef: gridRef, onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingSetting?.totalItem ?? 0, onChangePageSize: onChangePageSize })), jsxRuntime.jsx(SettingColumn, { gridRef: gridRef, handleSidebar: toggleSidebar, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: contentColumns, resetDefaultColumns: resetDefaultColumns, setColumn:
|
|
40272
|
-
if (saveSettingColumn) {
|
|
40273
|
-
saveSettingColumn(newColumns.map((x, index) => ({ field: x.field, headerText: x.headerDisplay, visible: x.visible, fixedType: x.fixedType, width: x.width, sortOrder: index + 1 })));
|
|
40274
|
-
}
|
|
40275
|
-
} })] }) }));
|
|
40283
|
+
}, setOpenPopupSetupColumn: setOpenPopupSetupColumn, focusRow: startCell.row, editDisable: editDisable, addDisable: addDisable, buttonSetting: buttonSetting, toolbarSetting: toolbarSetting, headerColumns: headerColumns }))] }), pagingSetting?.allowPaging && (jsxRuntime.jsx(PagingComponent, { gridRef: gridRef, onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingSetting?.totalItem ?? 0, onChangePageSize: onChangePageSize })), jsxRuntime.jsx(SettingColumn, { gridRef: gridRef, handleSidebar: toggleSidebar, settingColumns: settingColumns, openSidebar: openPopupSetupColumn, column: contentColumns, resetDefaultColumns: resetDefaultColumns, setColumn: handleSetColumn })] }) }));
|
|
40276
40284
|
});
|
|
40277
40285
|
|
|
40278
40286
|
const OptionFont = [
|