es-grid-template 1.5.2 → 1.5.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.
- package/es/grid-component/CheckboxFilter.js +0 -4
- package/es/grid-component/ColumnsGroup/ColumnsGroup.js +0 -1
- package/es/grid-component/InternalTable.js +1 -0
- package/es/grid-component/table/Group.js +4 -3
- package/lib/grid-component/CheckboxFilter.js +0 -4
- package/lib/grid-component/ColumnsGroup/ColumnsGroup.js +0 -1
- package/lib/grid-component/InternalTable.js +1 -0
- package/lib/grid-component/table/Group.js +4 -3
- package/package.json +1 -1
|
@@ -79,7 +79,6 @@ const CheckboxFilter = props => {
|
|
|
79
79
|
|
|
80
80
|
// const [searchValue, setSearchValue] = React.useState('');
|
|
81
81
|
|
|
82
|
-
console.log('options', options);
|
|
83
82
|
const [openKeys, setOpenKeys] = React.useState([]);
|
|
84
83
|
|
|
85
84
|
// clear search value after close filter dropdown
|
|
@@ -172,9 +171,6 @@ const CheckboxFilter = props => {
|
|
|
172
171
|
onSelect?.(keys);
|
|
173
172
|
}
|
|
174
173
|
};
|
|
175
|
-
console.log('getTreeData({ filters: options })', getTreeData({
|
|
176
|
-
filters: options
|
|
177
|
-
}));
|
|
178
174
|
if (filterMode === 'tree') {
|
|
179
175
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showFilter && /*#__PURE__*/React.createElement(FilterSearch, {
|
|
180
176
|
filterSearch: filterSearch,
|
|
@@ -16,6 +16,7 @@ import viDr from "rc-master-ui/es/locales/vi_VN";
|
|
|
16
16
|
// import useColumns from "./hooks/useColumns";
|
|
17
17
|
|
|
18
18
|
import "./styles.scss";
|
|
19
|
+
// import 'rc-master-ui/es/date-range-picker/styles/index.less'
|
|
19
20
|
// import 'rc-master-ui/assets/index.css'
|
|
20
21
|
|
|
21
22
|
import { flatColumns2, renderContent, renderFilter } from "./hooks/columns";
|
|
@@ -2,8 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { GridStyle } from "../GridStyle";
|
|
4
4
|
import TableGrid from "../TableGrid";
|
|
5
|
-
// import type {ColumnsTable} from "../type";
|
|
6
|
-
|
|
7
5
|
import { findAllChildrenKeys } from "../hooks";
|
|
8
6
|
import { ColumnsGroup } from "../ColumnsGroup/ColumnsGroup";
|
|
9
7
|
import { flatColumns2 } from "../hooks/columns";
|
|
@@ -137,9 +135,12 @@ const Group = props => {
|
|
|
137
135
|
expanded,
|
|
138
136
|
onExpand
|
|
139
137
|
} = args;
|
|
138
|
+
if (!groupColumns || groupColumns?.length === 0) {
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
140
141
|
|
|
141
142
|
// @ts-ignore
|
|
142
|
-
if (record?.children
|
|
143
|
+
if ((record?.children || record?.isChildren) && groupColumns?.length > 0) {
|
|
143
144
|
return expanded ? /*#__PURE__*/React.createElement("button", {
|
|
144
145
|
onClick: e => {
|
|
145
146
|
e.preventDefault();
|
|
@@ -88,7 +88,6 @@ const CheckboxFilter = props => {
|
|
|
88
88
|
|
|
89
89
|
// const [searchValue, setSearchValue] = React.useState('');
|
|
90
90
|
|
|
91
|
-
console.log('options', options);
|
|
92
91
|
const [openKeys, setOpenKeys] = React.useState([]);
|
|
93
92
|
|
|
94
93
|
// clear search value after close filter dropdown
|
|
@@ -181,9 +180,6 @@ const CheckboxFilter = props => {
|
|
|
181
180
|
onSelect?.(keys);
|
|
182
181
|
}
|
|
183
182
|
};
|
|
184
|
-
console.log('getTreeData({ filters: options })', getTreeData({
|
|
185
|
-
filters: options
|
|
186
|
-
}));
|
|
187
183
|
if (filterMode === 'tree') {
|
|
188
184
|
return /*#__PURE__*/React.createElement(React.Fragment, null, showFilter && /*#__PURE__*/React.createElement(_FilterSearch.default, {
|
|
189
185
|
filterSearch: filterSearch,
|
|
@@ -42,6 +42,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
42
42
|
|
|
43
43
|
// import useColumns from "./hooks/useColumns";
|
|
44
44
|
|
|
45
|
+
// import 'rc-master-ui/es/date-range-picker/styles/index.less'
|
|
45
46
|
// import 'rc-master-ui/assets/index.css'
|
|
46
47
|
|
|
47
48
|
// import {CSS} from "@dnd-kit/utilities";
|
|
@@ -15,8 +15,6 @@ var _columns = require("../hooks/columns");
|
|
|
15
15
|
var _becoxyIcons = require("becoxy-icons");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
// import type {ColumnsTable} from "../type";
|
|
19
|
-
|
|
20
18
|
const Group = props => {
|
|
21
19
|
const {
|
|
22
20
|
t,
|
|
@@ -146,9 +144,12 @@ const Group = props => {
|
|
|
146
144
|
expanded,
|
|
147
145
|
onExpand
|
|
148
146
|
} = args;
|
|
147
|
+
if (!groupColumns || groupColumns?.length === 0) {
|
|
148
|
+
return '';
|
|
149
|
+
}
|
|
149
150
|
|
|
150
151
|
// @ts-ignore
|
|
151
|
-
if (record?.children
|
|
152
|
+
if ((record?.children || record?.isChildren) && groupColumns?.length > 0) {
|
|
152
153
|
return expanded ? /*#__PURE__*/_react.default.createElement("button", {
|
|
153
154
|
onClick: e => {
|
|
154
155
|
e.preventDefault();
|