dtable-statistic 4.3.3 → 4.3.5
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.
|
@@ -49,7 +49,8 @@ class DTableSelect extends _react.default.Component {
|
|
|
49
49
|
noOptionsMessage,
|
|
50
50
|
classNamePrefix,
|
|
51
51
|
innerRef,
|
|
52
|
-
isDisabled
|
|
52
|
+
isDisabled,
|
|
53
|
+
customFilterOption
|
|
53
54
|
} = this.props;
|
|
54
55
|
return /*#__PURE__*/_react.default.createElement(_reactSelect.default, {
|
|
55
56
|
value: value,
|
|
@@ -57,6 +58,7 @@ class DTableSelect extends _react.default.Component {
|
|
|
57
58
|
ref: innerRef,
|
|
58
59
|
onChange: onChange,
|
|
59
60
|
options: options,
|
|
61
|
+
filterOption: customFilterOption,
|
|
60
62
|
isMulti: isMulti,
|
|
61
63
|
classNamePrefix: classNamePrefix,
|
|
62
64
|
styles: _constants.MenuSelectStyle,
|
|
@@ -13,6 +13,12 @@ var _components = require("../../../components");
|
|
|
13
13
|
class GroupbySettings extends _react.Component {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
+
this.getCustomFilterOption = (option, input) => {
|
|
17
|
+
var _option$data, _option$data$value;
|
|
18
|
+
const labelValue = (option === null || option === void 0 ? void 0 : (_option$data = option.data) === null || _option$data === void 0 ? void 0 : (_option$data$value = _option$data.value) === null || _option$data$value === void 0 ? void 0 : _option$data$value.name) && option.data.value.name.trim().toLowerCase() || '';
|
|
19
|
+
const inputValue = typeof input === 'string' && input.trim().toLowerCase();
|
|
20
|
+
return labelValue.includes(inputValue);
|
|
21
|
+
};
|
|
16
22
|
this.renderGroupby = () => {
|
|
17
23
|
const {
|
|
18
24
|
columnsOptions,
|
|
@@ -21,10 +27,13 @@ class GroupbySettings extends _react.Component {
|
|
|
21
27
|
} = this.props;
|
|
22
28
|
const selectedColumnOption = this.props.getSelectedColumnOption(groupbyColumnKey, columnsOptions);
|
|
23
29
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("label", null, label), /*#__PURE__*/_react.default.createElement(_components.DTableSelect, {
|
|
30
|
+
isSearchable: true,
|
|
24
31
|
placeholder: _reactIntlUniversal.default.get('Select_a_column'),
|
|
25
32
|
value: selectedColumnOption,
|
|
26
33
|
onChange: this.onSelectGroupbyColumn,
|
|
27
|
-
options: columnsOptions
|
|
34
|
+
options: columnsOptions,
|
|
35
|
+
customFilterOption: this.getCustomFilterOption,
|
|
36
|
+
noOptionsMessage: () => _reactIntlUniversal.default.get('No_options')
|
|
28
37
|
}));
|
|
29
38
|
};
|
|
30
39
|
this.renderGroupbyDateGranularity = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.5",
|
|
4
4
|
"description": "statistics",
|
|
5
5
|
"main": "dist/dtable-statistic.js",
|
|
6
6
|
"author": "seafile",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@seafile/seafile-calendar": "0.0.24",
|
|
13
13
|
"comlink": "^4.3.1",
|
|
14
14
|
"dayjs": "1.10.7",
|
|
15
|
-
"dtable-store": "4.3.
|
|
16
|
-
"dtable-web-api": "4.
|
|
15
|
+
"dtable-store": "4.3.6",
|
|
16
|
+
"dtable-web-api": "4.3.5",
|
|
17
17
|
"glamor": "^2.20.40",
|
|
18
18
|
"html2canvas": "^1.4.1",
|
|
19
19
|
"rc-slider": "^9.7.4",
|