@teselagen/ui 0.3.5 → 0.3.6
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/index.umd.js
CHANGED
|
@@ -55039,12 +55039,20 @@
|
|
|
55039
55039
|
return toString$4.call(it).slice(8, -1);
|
|
55040
55040
|
};
|
|
55041
55041
|
|
|
55042
|
-
|
|
55043
|
-
var
|
|
55044
|
-
|
|
55045
|
-
|
|
55046
|
-
|
|
55047
|
-
|
|
55042
|
+
var _iobject;
|
|
55043
|
+
var hasRequired_iobject;
|
|
55044
|
+
|
|
55045
|
+
function require_iobject () {
|
|
55046
|
+
if (hasRequired_iobject) return _iobject;
|
|
55047
|
+
hasRequired_iobject = 1;
|
|
55048
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
55049
|
+
var cof = _cof;
|
|
55050
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
55051
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
55052
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
55053
|
+
};
|
|
55054
|
+
return _iobject;
|
|
55055
|
+
}
|
|
55048
55056
|
|
|
55049
55057
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
55050
55058
|
var _defined = function (it) {
|
|
@@ -55053,7 +55061,7 @@
|
|
|
55053
55061
|
};
|
|
55054
55062
|
|
|
55055
55063
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
55056
|
-
var IObject =
|
|
55064
|
+
var IObject = require_iobject();
|
|
55057
55065
|
var defined$2 = _defined;
|
|
55058
55066
|
var _toIobject = function (it) {
|
|
55059
55067
|
return IObject(defined$2(it));
|
|
@@ -55173,7 +55181,14 @@
|
|
|
55173
55181
|
|
|
55174
55182
|
var _objectPie = {};
|
|
55175
55183
|
|
|
55176
|
-
|
|
55184
|
+
var hasRequired_objectPie;
|
|
55185
|
+
|
|
55186
|
+
function require_objectPie () {
|
|
55187
|
+
if (hasRequired_objectPie) return _objectPie;
|
|
55188
|
+
hasRequired_objectPie = 1;
|
|
55189
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
55190
|
+
return _objectPie;
|
|
55191
|
+
}
|
|
55177
55192
|
|
|
55178
55193
|
// 7.1.13 ToObject(argument)
|
|
55179
55194
|
var defined$1 = _defined;
|
|
@@ -55191,9 +55206,9 @@
|
|
|
55191
55206
|
var DESCRIPTORS = _descriptors;
|
|
55192
55207
|
var getKeys = _objectKeys;
|
|
55193
55208
|
var gOPS = _objectGops;
|
|
55194
|
-
var pIE =
|
|
55209
|
+
var pIE = require_objectPie();
|
|
55195
55210
|
var toObject = _toObject;
|
|
55196
|
-
var IObject =
|
|
55211
|
+
var IObject = require_iobject();
|
|
55197
55212
|
var $assign = Object.assign;
|
|
55198
55213
|
|
|
55199
55214
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -55906,7 +55921,7 @@
|
|
|
55906
55921
|
// all enumerable object keys, includes symbols
|
|
55907
55922
|
var getKeys = _objectKeys;
|
|
55908
55923
|
var gOPS$1 = _objectGops;
|
|
55909
|
-
var pIE$1 =
|
|
55924
|
+
var pIE$1 = require_objectPie();
|
|
55910
55925
|
var _enumKeys = function (it) {
|
|
55911
55926
|
var result = getKeys(it);
|
|
55912
55927
|
var getSymbols = gOPS$1.f;
|
|
@@ -55959,7 +55974,7 @@
|
|
|
55959
55974
|
|
|
55960
55975
|
var _objectGopd = {};
|
|
55961
55976
|
|
|
55962
|
-
var pIE =
|
|
55977
|
+
var pIE = require_objectPie();
|
|
55963
55978
|
var createDesc$1 = _propertyDesc;
|
|
55964
55979
|
var toIObject$1 = _toIobject;
|
|
55965
55980
|
var toPrimitive$1 = _toPrimitive;
|
|
@@ -56127,7 +56142,7 @@
|
|
|
56127
56142
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
56128
56143
|
$DP.f = $defineProperty;
|
|
56129
56144
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
56130
|
-
|
|
56145
|
+
require_objectPie().f = $propertyIsEnumerable;
|
|
56131
56146
|
$GOPS.f = $getOwnPropertySymbols;
|
|
56132
56147
|
|
|
56133
56148
|
if (DESCRIPTORS && !_library) {
|
|
@@ -90726,7 +90741,7 @@
|
|
|
90726
90741
|
stringFilterValue = stringFilterValue || "";
|
|
90727
90742
|
}
|
|
90728
90743
|
const filterValLower = stringFilterValue.toLowerCase && stringFilterValue.toLowerCase();
|
|
90729
|
-
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split("
|
|
90744
|
+
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
90730
90745
|
if (ccSelectedFilter === "startsWith") {
|
|
90731
90746
|
return qb ? qb.startsWith(stringFilterValue) : (fieldVal) => {
|
|
90732
90747
|
if (!fieldVal || !fieldVal.toLowerCase)
|
|
@@ -96652,6 +96667,31 @@
|
|
|
96652
96667
|
window.toastr.default = preventDuplicates(generateToast(Intent.NONE));
|
|
96653
96668
|
}
|
|
96654
96669
|
|
|
96670
|
+
const filterTypesDictionary = {
|
|
96671
|
+
none: "",
|
|
96672
|
+
startsWith: "text",
|
|
96673
|
+
endsWith: "text",
|
|
96674
|
+
contains: "text",
|
|
96675
|
+
notContains: "text",
|
|
96676
|
+
isExactly: "text",
|
|
96677
|
+
isEmpty: "text",
|
|
96678
|
+
notEmpty: "text",
|
|
96679
|
+
inList: "list",
|
|
96680
|
+
notInList: "list",
|
|
96681
|
+
true: "boolean",
|
|
96682
|
+
false: "boolean",
|
|
96683
|
+
dateIs: "date",
|
|
96684
|
+
notBetween: "dateRange",
|
|
96685
|
+
isBetween: "dateRange",
|
|
96686
|
+
isBefore: "date",
|
|
96687
|
+
isAfter: "date",
|
|
96688
|
+
greaterThan: "number",
|
|
96689
|
+
lessThan: "number",
|
|
96690
|
+
inRange: "numberRange",
|
|
96691
|
+
outsideRange: "numberRange",
|
|
96692
|
+
equalTo: "number",
|
|
96693
|
+
regex: "text"
|
|
96694
|
+
};
|
|
96655
96695
|
const isInvalidFilterValue = (value) => {
|
|
96656
96696
|
if (Array.isArray(value) && value.length) {
|
|
96657
96697
|
return value.some((item) => isInvalidFilterValue(item));
|
|
@@ -96669,6 +96709,16 @@
|
|
|
96669
96709
|
};
|
|
96670
96710
|
}
|
|
96671
96711
|
handleFilterChange = (selectedFilter) => {
|
|
96712
|
+
const { filterValue } = this.state;
|
|
96713
|
+
if (filterValue && !Array.isArray(filterValue) && filterTypesDictionary[selectedFilter] === "list") {
|
|
96714
|
+
this.setState({
|
|
96715
|
+
filterValue: filterValue?.split(" ") || []
|
|
96716
|
+
});
|
|
96717
|
+
} else if (filterTypesDictionary[selectedFilter] === "text" && Array.isArray(filterValue)) {
|
|
96718
|
+
this.setState({
|
|
96719
|
+
filterValue: filterValue.join(" ")
|
|
96720
|
+
});
|
|
96721
|
+
}
|
|
96672
96722
|
this.setState({ selectedFilter: lodashExports.camelCase(selectedFilter) });
|
|
96673
96723
|
};
|
|
96674
96724
|
handleFilterValueChange = (filterValue) => {
|
|
@@ -96711,36 +96761,7 @@
|
|
|
96711
96761
|
render() {
|
|
96712
96762
|
const { selectedFilter, filterValue } = this.state;
|
|
96713
96763
|
const { dataType, currentFilter, removeSingleFilter } = this.props;
|
|
96714
|
-
const {
|
|
96715
|
-
handleFilterChange,
|
|
96716
|
-
handleFilterValueChange,
|
|
96717
|
-
handleFilterSubmit
|
|
96718
|
-
} = this;
|
|
96719
|
-
const filterTypesDictionary = {
|
|
96720
|
-
none: "",
|
|
96721
|
-
startsWith: "text",
|
|
96722
|
-
endsWith: "text",
|
|
96723
|
-
contains: "text",
|
|
96724
|
-
notContains: "text",
|
|
96725
|
-
isExactly: "text",
|
|
96726
|
-
isEmpty: "text",
|
|
96727
|
-
notEmpty: "text",
|
|
96728
|
-
inList: "list",
|
|
96729
|
-
notInList: "list",
|
|
96730
|
-
true: "boolean",
|
|
96731
|
-
false: "boolean",
|
|
96732
|
-
dateIs: "date",
|
|
96733
|
-
notBetween: "dateRange",
|
|
96734
|
-
isBetween: "dateRange",
|
|
96735
|
-
isBefore: "date",
|
|
96736
|
-
isAfter: "date",
|
|
96737
|
-
greaterThan: "number",
|
|
96738
|
-
lessThan: "number",
|
|
96739
|
-
inRange: "numberRange",
|
|
96740
|
-
outsideRange: "numberRange",
|
|
96741
|
-
equalTo: "number",
|
|
96742
|
-
regex: "text"
|
|
96743
|
-
};
|
|
96764
|
+
const { handleFilterChange, handleFilterValueChange, handleFilterSubmit } = this;
|
|
96744
96765
|
const filterMenuItems = getFilterMenuItems(dataType);
|
|
96745
96766
|
const ccSelectedFilter = lodashExports.camelCase(selectedFilter);
|
|
96746
96767
|
const requiresValue = ccSelectedFilter && ccSelectedFilter !== "none";
|
|
@@ -96906,7 +96927,7 @@
|
|
|
96906
96927
|
if (Array.isArray(filterValue)) {
|
|
96907
96928
|
filterValueToUse = filterValue;
|
|
96908
96929
|
} else {
|
|
96909
|
-
filterValueToUse = filterValue && filterValue.split && filterValue.split("
|
|
96930
|
+
filterValueToUse = filterValue && filterValue.split && filterValue.split(";");
|
|
96910
96931
|
}
|
|
96911
96932
|
inputGroup = /* @__PURE__ */ React$1.createElement("div", { className: "custom-menu-item" }, /* @__PURE__ */ React$1.createElement(
|
|
96912
96933
|
DateRangeInput,
|
|
@@ -113646,7 +113667,7 @@
|
|
|
113646
113667
|
({ displayName, path, selectedFilter, filterValue }) => {
|
|
113647
113668
|
let filterValToDisplay = filterValue;
|
|
113648
113669
|
if (selectedFilter === "inList") {
|
|
113649
|
-
filterValToDisplay = Array.isArray(filterValToDisplay) ? filterValToDisplay : filterValToDisplay && filterValToDisplay.split("
|
|
113670
|
+
filterValToDisplay = Array.isArray(filterValToDisplay) ? filterValToDisplay : filterValToDisplay && filterValToDisplay.split(";");
|
|
113650
113671
|
}
|
|
113651
113672
|
if (Array.isArray(filterValToDisplay)) {
|
|
113652
113673
|
filterValToDisplay = filterValToDisplay.join(", ");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@teselagen/file-utils": "0.3.
|
|
7
|
-
"@teselagen/bounce-loader": "0.3.
|
|
6
|
+
"@teselagen/file-utils": "0.3.6",
|
|
7
|
+
"@teselagen/bounce-loader": "0.3.6",
|
|
8
8
|
"@blueprintjs/core": "3.52.0",
|
|
9
9
|
"@blueprintjs/datetime": "3.23.19",
|
|
10
10
|
"@blueprintjs/icons": "3.33.0",
|
|
@@ -21,9 +21,35 @@ import "@teselagen/react-table/react-table.css";
|
|
|
21
21
|
import "./style.css";
|
|
22
22
|
import "../toastr";
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const filterTypesDictionary = {
|
|
25
|
+
none: "",
|
|
26
|
+
startsWith: "text",
|
|
27
|
+
endsWith: "text",
|
|
28
|
+
contains: "text",
|
|
29
|
+
notContains: "text",
|
|
30
|
+
isExactly: "text",
|
|
31
|
+
isEmpty: "text",
|
|
32
|
+
notEmpty: "text",
|
|
33
|
+
inList: "list",
|
|
34
|
+
notInList: "list",
|
|
35
|
+
true: "boolean",
|
|
36
|
+
false: "boolean",
|
|
37
|
+
dateIs: "date",
|
|
38
|
+
notBetween: "dateRange",
|
|
39
|
+
isBetween: "dateRange",
|
|
40
|
+
isBefore: "date",
|
|
41
|
+
isAfter: "date",
|
|
42
|
+
greaterThan: "number",
|
|
43
|
+
lessThan: "number",
|
|
44
|
+
inRange: "numberRange",
|
|
45
|
+
outsideRange: "numberRange",
|
|
46
|
+
equalTo: "number",
|
|
47
|
+
regex: "text"
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const isInvalidFilterValue = (value) => {
|
|
25
51
|
if (Array.isArray(value) && value.length) {
|
|
26
|
-
return value.some(item => isInvalidFilterValue(item));
|
|
52
|
+
return value.some((item) => isInvalidFilterValue(item));
|
|
27
53
|
}
|
|
28
54
|
return value === "" || value === undefined || value.length === 0;
|
|
29
55
|
};
|
|
@@ -38,10 +64,27 @@ export default class FilterAndSortMenu extends React.Component {
|
|
|
38
64
|
...this.props.currentFilter
|
|
39
65
|
};
|
|
40
66
|
}
|
|
41
|
-
handleFilterChange = selectedFilter => {
|
|
67
|
+
handleFilterChange = (selectedFilter) => {
|
|
68
|
+
const { filterValue } = this.state;
|
|
69
|
+
if (
|
|
70
|
+
filterValue &&
|
|
71
|
+
!Array.isArray(filterValue) &&
|
|
72
|
+
filterTypesDictionary[selectedFilter] === "list"
|
|
73
|
+
) {
|
|
74
|
+
this.setState({
|
|
75
|
+
filterValue: filterValue?.split(" ") || []
|
|
76
|
+
});
|
|
77
|
+
} else if (
|
|
78
|
+
filterTypesDictionary[selectedFilter] === "text" &&
|
|
79
|
+
Array.isArray(filterValue)
|
|
80
|
+
) {
|
|
81
|
+
this.setState({
|
|
82
|
+
filterValue: filterValue.join(" ")
|
|
83
|
+
});
|
|
84
|
+
}
|
|
42
85
|
this.setState({ selectedFilter: camelCase(selectedFilter) });
|
|
43
86
|
};
|
|
44
|
-
handleFilterValueChange = filterValue => {
|
|
87
|
+
handleFilterValueChange = (filterValue) => {
|
|
45
88
|
this.setState({ filterValue });
|
|
46
89
|
};
|
|
47
90
|
handleFilterSubmit = () => {
|
|
@@ -65,7 +108,7 @@ export default class FilterAndSortMenu extends React.Component {
|
|
|
65
108
|
if (dataType === "number") {
|
|
66
109
|
filterValToUse =
|
|
67
110
|
filterValue &&
|
|
68
|
-
filterValue.map(val => parseFloat(val.replaceAll(",", "")));
|
|
111
|
+
filterValue.map((val) => parseFloat(val.replaceAll(",", "")));
|
|
69
112
|
}
|
|
70
113
|
}
|
|
71
114
|
|
|
@@ -91,36 +134,9 @@ export default class FilterAndSortMenu extends React.Component {
|
|
|
91
134
|
render() {
|
|
92
135
|
const { selectedFilter, filterValue } = this.state;
|
|
93
136
|
const { dataType, currentFilter, removeSingleFilter } = this.props;
|
|
94
|
-
const {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
handleFilterSubmit
|
|
98
|
-
} = this;
|
|
99
|
-
const filterTypesDictionary = {
|
|
100
|
-
none: "",
|
|
101
|
-
startsWith: "text",
|
|
102
|
-
endsWith: "text",
|
|
103
|
-
contains: "text",
|
|
104
|
-
notContains: "text",
|
|
105
|
-
isExactly: "text",
|
|
106
|
-
isEmpty: "text",
|
|
107
|
-
notEmpty: "text",
|
|
108
|
-
inList: "list",
|
|
109
|
-
notInList: "list",
|
|
110
|
-
true: "boolean",
|
|
111
|
-
false: "boolean",
|
|
112
|
-
dateIs: "date",
|
|
113
|
-
notBetween: "dateRange",
|
|
114
|
-
isBetween: "dateRange",
|
|
115
|
-
isBefore: "date",
|
|
116
|
-
isAfter: "date",
|
|
117
|
-
greaterThan: "number",
|
|
118
|
-
lessThan: "number",
|
|
119
|
-
inRange: "numberRange",
|
|
120
|
-
outsideRange: "numberRange",
|
|
121
|
-
equalTo: "number",
|
|
122
|
-
regex: "text"
|
|
123
|
-
};
|
|
137
|
+
const { handleFilterChange, handleFilterValueChange, handleFilterSubmit } =
|
|
138
|
+
this;
|
|
139
|
+
|
|
124
140
|
const filterMenuItems = getFilterMenuItems(dataType);
|
|
125
141
|
const ccSelectedFilter = camelCase(selectedFilter);
|
|
126
142
|
const requiresValue = ccSelectedFilter && ccSelectedFilter !== "none";
|
|
@@ -130,13 +146,13 @@ export default class FilterAndSortMenu extends React.Component {
|
|
|
130
146
|
<div className="custom-menu-item">
|
|
131
147
|
<div className={classNames(Classes.SELECT, Classes.FILL)}>
|
|
132
148
|
<select
|
|
133
|
-
onChange={function(e) {
|
|
149
|
+
onChange={function (e) {
|
|
134
150
|
const ccSelectedFilter = camelCase(e.target.value);
|
|
135
151
|
handleFilterChange(ccSelectedFilter);
|
|
136
152
|
}}
|
|
137
153
|
value={ccSelectedFilter}
|
|
138
154
|
>
|
|
139
|
-
{filterMenuItems.map(function(menuItem, index) {
|
|
155
|
+
{filterMenuItems.map(function (menuItem, index) {
|
|
140
156
|
return (
|
|
141
157
|
<option key={index} value={camelCase(menuItem)}>
|
|
142
158
|
{menuItem}
|
|
@@ -176,12 +192,8 @@ export default class FilterAndSortMenu extends React.Component {
|
|
|
176
192
|
}
|
|
177
193
|
|
|
178
194
|
const dateMinMaxHelpers = {
|
|
179
|
-
minDate: dayjs()
|
|
180
|
-
|
|
181
|
-
.toDate(),
|
|
182
|
-
maxDate: dayjs()
|
|
183
|
-
.add(25, "years")
|
|
184
|
-
.toDate()
|
|
195
|
+
minDate: dayjs().subtract(25, "years").toDate(),
|
|
196
|
+
maxDate: dayjs().add(25, "years").toDate()
|
|
185
197
|
};
|
|
186
198
|
const renderCreateNewOption = (query, active, handleClick) => (
|
|
187
199
|
<MenuItem
|
|
@@ -213,7 +225,7 @@ class FilterInput extends React.Component {
|
|
|
213
225
|
<div className="custom-menu-item">
|
|
214
226
|
<InputGroup
|
|
215
227
|
placeholder="Value"
|
|
216
|
-
onChange={function(e) {
|
|
228
|
+
onChange={function (e) {
|
|
217
229
|
handleFilterValueChange(e.target.value);
|
|
218
230
|
}}
|
|
219
231
|
autoFocus
|
|
@@ -232,15 +244,15 @@ class FilterInput extends React.Component {
|
|
|
232
244
|
noResults={null}
|
|
233
245
|
multi={true}
|
|
234
246
|
creatable={true}
|
|
235
|
-
value={(filterValue || []).map(val => ({
|
|
247
|
+
value={(filterValue || []).map((val) => ({
|
|
236
248
|
label: val,
|
|
237
249
|
value: val
|
|
238
250
|
}))}
|
|
239
|
-
onChange={selectedOptions => {
|
|
240
|
-
selectedOptions.some(opt => opt.value === "")
|
|
251
|
+
onChange={(selectedOptions) => {
|
|
252
|
+
selectedOptions.some((opt) => opt.value === "")
|
|
241
253
|
? handleFilterSubmit()
|
|
242
254
|
: handleFilterValueChange(
|
|
243
|
-
selectedOptions.map(opt => opt.value)
|
|
255
|
+
selectedOptions.map((opt) => opt.value)
|
|
244
256
|
);
|
|
245
257
|
}}
|
|
246
258
|
options={[]}
|
|
@@ -253,7 +265,7 @@ class FilterInput extends React.Component {
|
|
|
253
265
|
<div className="custom-menu-item">
|
|
254
266
|
<NumericInput
|
|
255
267
|
placeholder="Value"
|
|
256
|
-
onValueChange={function(numVal) {
|
|
268
|
+
onValueChange={function (numVal) {
|
|
257
269
|
handleFilterValueChange(isNaN(numVal) ? 0 : numVal);
|
|
258
270
|
}}
|
|
259
271
|
autoFocus
|
|
@@ -268,7 +280,7 @@ class FilterInput extends React.Component {
|
|
|
268
280
|
<div className="custom-menu-item">
|
|
269
281
|
<NumericInput
|
|
270
282
|
placeholder="Low"
|
|
271
|
-
onValueChange={function(numVal) {
|
|
283
|
+
onValueChange={function (numVal) {
|
|
272
284
|
handleFilterValueChange([
|
|
273
285
|
isNaN(numVal) ? 0 : numVal,
|
|
274
286
|
filterValue[1]
|
|
@@ -279,7 +291,7 @@ class FilterInput extends React.Component {
|
|
|
279
291
|
/>
|
|
280
292
|
<NumericInput
|
|
281
293
|
placeholder="High"
|
|
282
|
-
onValueChange={function(numVal) {
|
|
294
|
+
onValueChange={function (numVal) {
|
|
283
295
|
handleFilterValueChange([
|
|
284
296
|
filterValue[0],
|
|
285
297
|
isNaN(numVal) ? 0 : numVal
|
|
@@ -298,7 +310,7 @@ class FilterInput extends React.Component {
|
|
|
298
310
|
value={filterValue ? dayjs(filterValue).toDate() : undefined}
|
|
299
311
|
{...getDayjsFormatter("L")}
|
|
300
312
|
{...dateMinMaxHelpers}
|
|
301
|
-
onChange={selectedDates => {
|
|
313
|
+
onChange={(selectedDates) => {
|
|
302
314
|
handleFilterValueChange(selectedDates);
|
|
303
315
|
}}
|
|
304
316
|
/>
|
|
@@ -312,7 +324,7 @@ class FilterInput extends React.Component {
|
|
|
312
324
|
filterValueToUse = filterValue;
|
|
313
325
|
} else {
|
|
314
326
|
filterValueToUse =
|
|
315
|
-
filterValue && filterValue.split && filterValue.split("
|
|
327
|
+
filterValue && filterValue.split && filterValue.split(";");
|
|
316
328
|
}
|
|
317
329
|
inputGroup = (
|
|
318
330
|
<div className="custom-menu-item">
|
|
@@ -329,13 +341,13 @@ class FilterInput extends React.Component {
|
|
|
329
341
|
captureDismiss: true
|
|
330
342
|
}}
|
|
331
343
|
{...{
|
|
332
|
-
formatDate: date =>
|
|
344
|
+
formatDate: (date) =>
|
|
333
345
|
date == null ? "" : date.toLocaleDateString(),
|
|
334
|
-
parseDate: str => new Date(Date.parse(str)),
|
|
346
|
+
parseDate: (str) => new Date(Date.parse(str)),
|
|
335
347
|
placeholder: "JS Date"
|
|
336
348
|
}}
|
|
337
349
|
{...dateMinMaxHelpers}
|
|
338
|
-
onChange={selectedDates => {
|
|
350
|
+
onChange={(selectedDates) => {
|
|
339
351
|
if (selectedDates[0] && selectedDates[1]) {
|
|
340
352
|
handleFilterValueChange(selectedDates);
|
|
341
353
|
}
|
package/src/DataTable/index.js
CHANGED
|
@@ -1310,7 +1310,7 @@ class DataTable extends React.Component {
|
|
|
1310
1310
|
if (selectedFilter === "inList") {
|
|
1311
1311
|
filterValToDisplay = Array.isArray(filterValToDisplay)
|
|
1312
1312
|
? filterValToDisplay
|
|
1313
|
-
: filterValToDisplay && filterValToDisplay.split("
|
|
1313
|
+
: filterValToDisplay && filterValToDisplay.split(";");
|
|
1314
1314
|
}
|
|
1315
1315
|
if (Array.isArray(filterValToDisplay)) {
|
|
1316
1316
|
filterValToDisplay = filterValToDisplay.join(", ");
|
|
@@ -306,7 +306,7 @@ function getSubFilter(
|
|
|
306
306
|
stringFilterValue.toLowerCase && stringFilterValue.toLowerCase();
|
|
307
307
|
const arrayFilterValue = Array.isArray(filterValue)
|
|
308
308
|
? filterValue
|
|
309
|
-
: stringFilterValue.split("
|
|
309
|
+
: stringFilterValue.split(";");
|
|
310
310
|
if (ccSelectedFilter === "startsWith") {
|
|
311
311
|
return qb
|
|
312
312
|
? qb.startsWith(stringFilterValue) //filter using qb (aka we're backend connected)
|