react-table-edit 1.4.21 → 1.4.22
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 +7 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65522,19 +65522,14 @@ const RenderFilterElement = ({ filter, optionsFilter, formatSetting, filterBy, s
|
|
|
65522
65522
|
}, placeholder: t('Select') }) }));
|
|
65523
65523
|
};
|
|
65524
65524
|
const handleSave = () => {
|
|
65525
|
-
if (
|
|
65526
|
-
|
|
65527
|
-
|
|
65528
|
-
filter.value = valueFilter;
|
|
65529
|
-
}
|
|
65530
|
-
else {
|
|
65531
|
-
filterBy.push({ key: column.field, ope: operator, value: valueFilter });
|
|
65532
|
-
}
|
|
65533
|
-
changeFilter([...filterBy]);
|
|
65525
|
+
if (filter) {
|
|
65526
|
+
filter.ope = operator;
|
|
65527
|
+
filter.value = valueFilter ?? '';
|
|
65534
65528
|
}
|
|
65535
65529
|
else {
|
|
65536
|
-
|
|
65530
|
+
filterBy.push({ key: column.field, ope: operator, value: valueFilter ?? '' });
|
|
65537
65531
|
}
|
|
65532
|
+
changeFilter([...filterBy]);
|
|
65538
65533
|
setOpenFilter(false);
|
|
65539
65534
|
};
|
|
65540
65535
|
return (jsxRuntime.jsxs("div", { className: 'r-filter-popup', onKeyDown: (e) => {
|
|
@@ -65542,7 +65537,7 @@ const RenderFilterElement = ({ filter, optionsFilter, formatSetting, filterBy, s
|
|
|
65542
65537
|
handleSave();
|
|
65543
65538
|
e.stopPropagation();
|
|
65544
65539
|
}
|
|
65545
|
-
}, children: [((!column.filterType && column.type === 'numeric') || column.filterType === 'numeric') ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderNumberFilter(), " "] }) : (column.filterType === 'select' ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderSelectFilter(), " "] }) : RenderStringFilter()), jsxRuntime.jsxs("div", { className: 'd-flex justify-content-end', children: [jsxRuntime.jsx(Button$1, {
|
|
65540
|
+
}, children: [((!column.filterType && column.type === 'numeric') || column.filterType === 'numeric') ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderNumberFilter(), " "] }) : (column.filterType === 'select' ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderSelectFilter(), " "] }) : RenderStringFilter()), jsxRuntime.jsxs("div", { className: 'd-flex justify-content-end', children: [jsxRuntime.jsx(Button$1, { color: 'primary', style: { borderRadius: 3 }, className: 'me-50 py-25 px-50 fw-bold', onClick: handleSave, children: t('Filter') }), jsxRuntime.jsx(Button$1, { className: 'py-25 px-50 fw-bold', outline: true, style: { borderRadius: 3 }, onClick: () => {
|
|
65546
65541
|
if (filterBy) {
|
|
65547
65542
|
changeFilter(filterBy.filter((x) => x.key !== column.field));
|
|
65548
65543
|
}
|
|
@@ -65725,7 +65720,7 @@ const VirtualTable = ({ idTable, dataSource, rowHeight = 33, height = 400, colum
|
|
|
65725
65720
|
}
|
|
65726
65721
|
}
|
|
65727
65722
|
};
|
|
65728
|
-
return (jsxRuntime.jsxs("div", { className: "react-table-edit", children: [jsxRuntime.jsxs("div", { className: 'r-grid', children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", onScroll: handleScroll, style: { height: `${height ? `${height}px` : 'auto'}` }, children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: flatVisble }), jsxRuntime.jsx("thead", { className: 'r-gridheader', children: headerColumns.map((rowColumn, indexParent) => (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((column, indexColumn) => (jsxRuntime.jsx(HeaderTableCol, { idTable: idTable, col: column, dataSource: dataSource, indexCol: indexColumn, indexParent: indexParent, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, columns: contentColumns, setColumns: setColumns, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, orderBy: orderBy, allowFilter: allowFilter, allowOrder: allowOrder, filterBy: filterBy, optionsFilter: optionsFilter, changeFilter: (val) => {
|
|
65723
|
+
return (jsxRuntime.jsxs("div", { className: "react-table-edit r-virtualized-table", children: [jsxRuntime.jsxs("div", { className: 'r-grid', children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsxs("div", { ref: gridRef, className: "r-gridtable", onScroll: handleScroll, style: { height: `${height ? `${height}px` : 'auto'}` }, children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: flatVisble }), jsxRuntime.jsx("thead", { className: 'r-gridheader', children: headerColumns.map((rowColumn, indexParent) => (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((column, indexColumn) => (jsxRuntime.jsx(HeaderTableCol, { idTable: idTable, col: column, dataSource: dataSource, indexCol: indexColumn, indexParent: indexParent, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, columns: contentColumns, setColumns: setColumns, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, orderBy: orderBy, allowFilter: allowFilter, allowOrder: allowOrder, filterBy: filterBy, optionsFilter: optionsFilter, changeFilter: (val) => {
|
|
65729
65724
|
setFilterBy([...val]);
|
|
65730
65725
|
if (changeFilter) {
|
|
65731
65726
|
changeFilter(val);
|