@douyinfe/semi-foundation 2.19.0-beta.0 → 2.19.0
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/anchor/anchor.scss +1 -8
- package/anchor/rtl.scss +0 -1
- package/anchor/variables.scss +1 -0
- package/calendar/eventUtil.ts +8 -7
- package/calendar/foundation.ts +14 -14
- package/datePicker/monthsGridFoundation.ts +10 -3
- package/dropdown/foundation.ts +2 -1
- package/dropdown/menuFoundation.ts +2 -1
- package/getBabelConfig.js +0 -12
- package/lib/cjs/anchor/anchor.css +1 -10
- package/lib/cjs/anchor/anchor.scss +1 -8
- package/lib/cjs/anchor/constants.js +1 -4
- package/lib/cjs/anchor/foundation.js +5 -12
- package/lib/cjs/anchor/linkFoundation.js +4 -9
- package/lib/cjs/anchor/rtl.scss +0 -1
- package/lib/cjs/anchor/variables.scss +1 -0
- package/lib/cjs/autoComplete/constants.js +1 -4
- package/lib/cjs/autoComplete/foundation.js +14 -33
- package/lib/cjs/autoComplete/optionFoundation.js +4 -9
- package/lib/cjs/avatar/constants.js +1 -4
- package/lib/cjs/avatar/foundation.js +4 -9
- package/lib/cjs/backtop/constants.js +1 -4
- package/lib/cjs/backtop/foundation.js +4 -9
- package/lib/cjs/badge/constants.js +1 -4
- package/lib/cjs/banner/constants.js +1 -4
- package/lib/cjs/banner/foundation.js +4 -9
- package/lib/cjs/base/constants.js +2 -6
- package/lib/cjs/base/env.js +1 -4
- package/lib/cjs/base/foundation.js +5 -10
- package/lib/cjs/base/index.js +3 -6
- package/lib/cjs/breadcrumb/constants.js +1 -4
- package/lib/cjs/breadcrumb/foundation.js +6 -13
- package/lib/cjs/breadcrumb/itemFoundation.js +4 -9
- package/lib/cjs/button/constants.js +1 -4
- package/lib/cjs/calendar/constants.js +1 -4
- package/lib/cjs/calendar/eventUtil.d.ts +3 -3
- package/lib/cjs/calendar/eventUtil.js +28 -53
- package/lib/cjs/calendar/foundation.js +63 -85
- package/lib/cjs/card/constants.js +1 -4
- package/lib/cjs/carousel/constants.js +1 -4
- package/lib/cjs/carousel/foundation.js +5 -12
- package/lib/cjs/cascader/constants.js +1 -4
- package/lib/cjs/cascader/foundation.js +55 -100
- package/lib/cjs/cascader/util.js +9 -30
- package/lib/cjs/checkbox/checkboxFoundation.js +6 -13
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +9 -18
- package/lib/cjs/checkbox/constants.js +1 -4
- package/lib/cjs/collapse/constants.js +1 -4
- package/lib/cjs/collapse/foundation.js +9 -20
- package/lib/cjs/collapsible/constants.js +1 -4
- package/lib/cjs/datePicker/_utils/formatter.js +3 -12
- package/lib/cjs/datePicker/_utils/getDayOfWeek.js +1 -4
- package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +1 -4
- package/lib/cjs/datePicker/_utils/getDefaultPickerDate.js +5 -10
- package/lib/cjs/datePicker/_utils/getFullDateOffset.js +3 -6
- package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +2 -11
- package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -4
- package/lib/cjs/datePicker/_utils/getMonthTable.js +2 -11
- package/lib/cjs/datePicker/_utils/getMonthsInYear.js +3 -16
- package/lib/cjs/datePicker/_utils/getYears.js +2 -9
- package/lib/cjs/datePicker/_utils/index.js +16 -30
- package/lib/cjs/datePicker/_utils/isAfter.js +3 -6
- package/lib/cjs/datePicker/_utils/isBefore.js +3 -6
- package/lib/cjs/datePicker/_utils/isBetween.js +3 -6
- package/lib/cjs/datePicker/_utils/isDate.js +1 -4
- package/lib/cjs/datePicker/_utils/isSameDay.js +3 -6
- package/lib/cjs/datePicker/_utils/isTimestamp.js +3 -6
- package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +3 -6
- package/lib/cjs/datePicker/_utils/isValidDate.js +1 -4
- package/lib/cjs/datePicker/_utils/isWithinInterval.js +3 -6
- package/lib/cjs/datePicker/_utils/parser.js +1 -4
- package/lib/cjs/datePicker/constants.js +3 -10
- package/lib/cjs/datePicker/foundation.js +42 -85
- package/lib/cjs/datePicker/inputFoundation.js +7 -20
- package/lib/cjs/datePicker/monthFoundation.js +5 -12
- package/lib/cjs/datePicker/monthsGridFoundation.js +47 -68
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +4 -9
- package/lib/cjs/descriptions/constants.js +1 -4
- package/lib/cjs/divider/constants.js +1 -4
- package/lib/cjs/dropdown/constants.js +1 -4
- package/lib/cjs/dropdown/foundation.js +7 -15
- package/lib/cjs/dropdown/menuFoundation.js +11 -31
- package/lib/cjs/empty/constants.js +1 -4
- package/lib/cjs/form/constants.js +1 -4
- package/lib/cjs/form/foundation.js +64 -104
- package/lib/cjs/form/interface.js +1 -3
- package/lib/cjs/form/utils.js +14 -29
- package/lib/cjs/grid/constants.js +1 -4
- package/lib/cjs/icons/constants.js +1 -4
- package/lib/cjs/input/constants.js +1 -4
- package/lib/cjs/input/foundation.js +7 -18
- package/lib/cjs/input/textareaFoundation.js +6 -13
- package/lib/cjs/input/util/calculateNodeHeight.js +3 -17
- package/lib/cjs/input/util/getSizingData.js +5 -10
- package/lib/cjs/inputNumber/constants.js +4 -11
- package/lib/cjs/inputNumber/foundation.js +11 -30
- package/lib/cjs/layout/constants.js +1 -4
- package/lib/cjs/list/constants.js +1 -4
- package/lib/cjs/modal/constants.js +1 -4
- package/lib/cjs/modal/modalContentFoundation.js +4 -9
- package/lib/cjs/modal/modalFoundation.js +4 -9
- package/lib/cjs/navigation/NavItem.js +6 -21
- package/lib/cjs/navigation/constants.js +1 -4
- package/lib/cjs/navigation/foundation.js +22 -37
- package/lib/cjs/navigation/itemFoundation.js +4 -9
- package/lib/cjs/navigation/subNavFoundation.js +10 -21
- package/lib/cjs/notification/constants.js +1 -4
- package/lib/cjs/notification/notificationFoundation.js +5 -12
- package/lib/cjs/notification/notificationListFoundation.js +4 -9
- package/lib/cjs/overflowList/constants.js +3 -10
- package/lib/cjs/overflowList/foundation.js +12 -29
- package/lib/cjs/pagination/constants.js +1 -4
- package/lib/cjs/pagination/foundation.js +18 -37
- package/lib/cjs/popconfirm/constants.js +1 -4
- package/lib/cjs/popconfirm/popconfirmFoundation.js +3 -6
- package/lib/cjs/popover/constants.js +2 -9
- package/lib/cjs/progress/constants.js +1 -4
- package/lib/cjs/radio/constants.js +1 -4
- package/lib/cjs/radio/radioFoundation.js +3 -6
- package/lib/cjs/radio/radioGroupFoundation.js +6 -11
- package/lib/cjs/radio/radioInnerFoundation.js +5 -10
- package/lib/cjs/rating/constants.js +1 -4
- package/lib/cjs/rating/foundation.js +7 -20
- package/lib/cjs/scrollList/constants.js +1 -4
- package/lib/cjs/scrollList/foundation.js +3 -6
- package/lib/cjs/scrollList/itemFoundation.js +8 -21
- package/lib/cjs/scrollList/scrollTo.js +1 -4
- package/lib/cjs/select/constants.js +1 -4
- package/lib/cjs/select/foundation.js +56 -98
- package/lib/cjs/select/optionFoundation.js +4 -9
- package/lib/cjs/sideSheet/constants.js +1 -4
- package/lib/cjs/sideSheet/sideSheetFoundation.js +6 -15
- package/lib/cjs/skeleton/constants.js +1 -4
- package/lib/cjs/slider/constants.js +1 -4
- package/lib/cjs/slider/foundation.js +13 -24
- package/lib/cjs/space/constants.js +1 -4
- package/lib/cjs/spin/constants.js +1 -4
- package/lib/cjs/spin/foundation.js +5 -12
- package/lib/cjs/steps/constants.js +1 -4
- package/lib/cjs/switch/constants.js +1 -4
- package/lib/cjs/switch/foundation.js +4 -9
- package/lib/cjs/table/bodyFoundation.js +9 -22
- package/lib/cjs/table/cellFoundation.js +3 -6
- package/lib/cjs/table/constants.js +1 -4
- package/lib/cjs/table/foundation.js +76 -117
- package/lib/cjs/table/tableRowFoundation.js +3 -6
- package/lib/cjs/table/tableSelectionCellFoundation.js +3 -6
- package/lib/cjs/table/utils.js +42 -71
- package/lib/cjs/tabs/constants.js +1 -4
- package/lib/cjs/tabs/foundation.js +8 -23
- package/lib/cjs/tag/constants.js +1 -4
- package/lib/cjs/tagInput/constants.js +1 -4
- package/lib/cjs/tagInput/foundation.js +12 -31
- package/lib/cjs/tagInput/utils/getSplitedArray.js +3 -6
- package/lib/cjs/timePicker/ComboxFoundation.js +10 -29
- package/lib/cjs/timePicker/constants.js +1 -4
- package/lib/cjs/timePicker/foundation.js +26 -45
- package/lib/cjs/timePicker/inputFoundation.js +4 -9
- package/lib/cjs/timePicker/utils/index.js +7 -14
- package/lib/cjs/timePicker/utils/localeDate.js +2 -9
- package/lib/cjs/timeline/constants.js +1 -4
- package/lib/cjs/toast/constants.js +1 -4
- package/lib/cjs/toast/toastFoundation.js +5 -12
- package/lib/cjs/toast/toastListFoundation.js +5 -12
- package/lib/cjs/tooltip/constants.js +1 -4
- package/lib/cjs/tooltip/foundation.js +29 -56
- package/lib/cjs/transfer/constants.js +1 -4
- package/lib/cjs/transfer/foundation.js +24 -47
- package/lib/cjs/transfer/transferUtils.js +16 -45
- package/lib/cjs/tree/constants.js +1 -4
- package/lib/cjs/tree/foundation.js +41 -76
- package/lib/cjs/tree/treeUtil.js +60 -107
- package/lib/cjs/treeSelect/constants.js +1 -4
- package/lib/cjs/treeSelect/foundation.js +49 -82
- package/lib/cjs/typography/constants.js +1 -4
- package/lib/cjs/upload/constants.js +1 -4
- package/lib/cjs/upload/foundation.js +56 -112
- package/lib/cjs/upload/utils.js +13 -32
- package/lib/cjs/utils/Event.js +9 -23
- package/lib/cjs/utils/FocusHandle.js +6 -15
- package/lib/cjs/utils/Logger.js +1 -4
- package/lib/cjs/utils/Store.js +5 -20
- package/lib/cjs/utils/a11y.js +8 -13
- package/lib/cjs/utils/array.js +6 -15
- package/lib/cjs/utils/arrayMove.js +3 -12
- package/lib/cjs/utils/classnames.js +6 -15
- package/lib/cjs/utils/date-fns-extra.js +7 -18
- package/lib/cjs/utils/dom.js +5 -12
- package/lib/cjs/utils/function.js +1 -4
- package/lib/cjs/utils/getDataAttr.js +2 -13
- package/lib/cjs/utils/getHighlight.js +7 -22
- package/lib/cjs/utils/getMotionObjFromProps.js +4 -9
- package/lib/cjs/utils/index.js +5 -15
- package/lib/cjs/utils/isBothNaN.js +1 -4
- package/lib/cjs/utils/isElement.js +1 -4
- package/lib/cjs/utils/isEnterPress.js +3 -6
- package/lib/cjs/utils/isEscPress.js +3 -6
- package/lib/cjs/utils/isNullOrUndefined.js +1 -4
- package/lib/cjs/utils/isNumber.js +1 -4
- package/lib/cjs/utils/isObject.js +1 -4
- package/lib/cjs/utils/isPromise.js +3 -6
- package/lib/cjs/utils/isString.js +1 -4
- package/lib/cjs/utils/keyCode.js +1 -4
- package/lib/cjs/utils/log.js +3 -6
- package/lib/cjs/utils/number.js +1 -4
- package/lib/cjs/utils/object.js +10 -27
- package/lib/cjs/utils/set.js +4 -9
- package/lib/cjs/utils/shallowEqualObjects.js +3 -10
- package/lib/cjs/utils/touchPolyfill.js +5 -12
- package/lib/cjs/utils/type.js +1 -3
- package/lib/cjs/utils/uuid.js +3 -14
- package/lib/cjs/utils/warning.js +1 -4
- package/lib/es/anchor/anchor.css +1 -10
- package/lib/es/anchor/anchor.scss +1 -8
- package/lib/es/anchor/foundation.js +2 -4
- package/lib/es/anchor/linkFoundation.js +1 -2
- package/lib/es/anchor/rtl.scss +0 -1
- package/lib/es/anchor/variables.scss +1 -0
- package/lib/es/autoComplete/foundation.js +11 -26
- package/lib/es/autoComplete/optionFoundation.js +1 -2
- package/lib/es/avatar/foundation.js +1 -2
- package/lib/es/backtop/foundation.js +1 -2
- package/lib/es/banner/foundation.js +1 -2
- package/lib/es/base/foundation.js +2 -3
- package/lib/es/breadcrumb/foundation.js +3 -6
- package/lib/es/breadcrumb/itemFoundation.js +1 -2
- package/lib/es/calendar/eventUtil.d.ts +3 -3
- package/lib/es/calendar/eventUtil.js +27 -56
- package/lib/es/calendar/foundation.js +60 -90
- package/lib/es/carousel/foundation.js +2 -4
- package/lib/es/cascader/foundation.js +49 -94
- package/lib/es/cascader/util.js +6 -21
- package/lib/es/checkbox/checkboxFoundation.js +3 -6
- package/lib/es/checkbox/checkboxGroupFoundation.js +6 -9
- package/lib/es/collapse/foundation.js +6 -10
- package/lib/es/datePicker/_utils/formatter.js +2 -5
- package/lib/es/datePicker/_utils/getDefaultPickerDate.js +2 -3
- package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -4
- package/lib/es/datePicker/_utils/getMonthTable.js +1 -5
- package/lib/es/datePicker/_utils/getMonthsInYear.js +2 -9
- package/lib/es/datePicker/_utils/getYears.js +1 -3
- package/lib/es/datePicker/constants.js +2 -7
- package/lib/es/datePicker/foundation.js +39 -70
- package/lib/es/datePicker/inputFoundation.js +4 -11
- package/lib/es/datePicker/monthFoundation.js +2 -4
- package/lib/es/datePicker/monthsGridFoundation.js +40 -55
- package/lib/es/datePicker/yearAndMonthFoundation.js +1 -2
- package/lib/es/dropdown/foundation.js +4 -7
- package/lib/es/dropdown/menuFoundation.js +8 -21
- package/lib/es/form/foundation.js +59 -91
- package/lib/es/form/utils.js +11 -19
- package/lib/es/input/foundation.js +4 -9
- package/lib/es/input/textareaFoundation.js +3 -5
- package/lib/es/input/util/calculateNodeHeight.js +2 -10
- package/lib/es/input/util/getSizingData.js +2 -5
- package/lib/es/inputNumber/constants.js +3 -8
- package/lib/es/inputNumber/foundation.js +8 -18
- package/lib/es/modal/modalContentFoundation.js +1 -2
- package/lib/es/modal/modalFoundation.js +1 -2
- package/lib/es/navigation/NavItem.js +5 -11
- package/lib/es/navigation/foundation.js +19 -25
- package/lib/es/navigation/itemFoundation.js +1 -3
- package/lib/es/navigation/subNavFoundation.js +7 -13
- package/lib/es/notification/notificationFoundation.js +2 -4
- package/lib/es/notification/notificationListFoundation.js +1 -3
- package/lib/es/overflowList/constants.js +2 -3
- package/lib/es/overflowList/foundation.js +9 -23
- package/lib/es/pagination/foundation.js +15 -28
- package/lib/es/popover/constants.js +1 -2
- package/lib/es/radio/radioGroupFoundation.js +3 -4
- package/lib/es/radio/radioInnerFoundation.js +2 -3
- package/lib/es/rating/foundation.js +4 -13
- package/lib/es/scrollList/itemFoundation.js +5 -13
- package/lib/es/select/foundation.js +50 -88
- package/lib/es/select/optionFoundation.js +1 -2
- package/lib/es/sideSheet/sideSheetFoundation.js +3 -7
- package/lib/es/slider/foundation.js +10 -16
- package/lib/es/spin/foundation.js +2 -4
- package/lib/es/switch/foundation.js +1 -2
- package/lib/es/table/bodyFoundation.js +6 -11
- package/lib/es/table/foundation.js +67 -93
- package/lib/es/table/utils.js +33 -51
- package/lib/es/tabs/foundation.js +5 -18
- package/lib/es/tagInput/foundation.js +9 -21
- package/lib/es/timePicker/ComboxFoundation.js +7 -16
- package/lib/es/timePicker/foundation.js +23 -37
- package/lib/es/timePicker/inputFoundation.js +1 -2
- package/lib/es/timePicker/utils/index.js +4 -6
- package/lib/es/timePicker/utils/localeDate.js +1 -2
- package/lib/es/toast/toastFoundation.js +2 -4
- package/lib/es/toast/toastListFoundation.js +2 -4
- package/lib/es/tooltip/foundation.js +26 -46
- package/lib/es/transfer/foundation.js +21 -43
- package/lib/es/transfer/transferUtils.js +13 -33
- package/lib/es/tree/foundation.js +38 -70
- package/lib/es/tree/treeUtil.js +57 -109
- package/lib/es/treeSelect/foundation.js +45 -73
- package/lib/es/upload/foundation.js +52 -118
- package/lib/es/upload/utils.js +12 -25
- package/lib/es/utils/Event.js +5 -12
- package/lib/es/utils/FocusHandle.js +3 -7
- package/lib/es/utils/Store.js +4 -12
- package/lib/es/utils/a11y.js +5 -6
- package/lib/es/utils/array.js +3 -5
- package/lib/es/utils/arrayMove.js +2 -6
- package/lib/es/utils/classnames.js +3 -6
- package/lib/es/utils/date-fns-extra.js +6 -14
- package/lib/es/utils/dom.js +1 -2
- package/lib/es/utils/getDataAttr.js +1 -5
- package/lib/es/utils/getHighlight.js +4 -14
- package/lib/es/utils/getMotionObjFromProps.js +1 -2
- package/lib/es/utils/object.js +7 -15
- package/lib/es/utils/set.js +1 -2
- package/lib/es/utils/shallowEqualObjects.js +2 -5
- package/lib/es/utils/touchPolyfill.js +2 -6
- package/lib/es/utils/uuid.js +2 -7
- package/package.json +2 -4
- package/select/foundation.ts +2 -2
|
@@ -10,22 +10,6 @@ import _each from "lodash/each";
|
|
|
10
10
|
import _isFunction from "lodash/isFunction";
|
|
11
11
|
import _merge from "lodash/merge";
|
|
12
12
|
import _get from "lodash/get";
|
|
13
|
-
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
14
|
-
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
15
|
-
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
16
|
-
import _keysInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/keys";
|
|
17
|
-
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
|
18
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
19
|
-
import _Map from "@babel/runtime-corejs3/core-js-stable/map";
|
|
20
|
-
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
21
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
22
|
-
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
23
|
-
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
24
|
-
import _valuesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/values";
|
|
25
|
-
import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
|
|
26
|
-
import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
|
|
27
|
-
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
|
|
28
|
-
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
|
|
29
13
|
import memoizeOne from 'memoize-one';
|
|
30
14
|
import BaseFoundation from '../base/foundation';
|
|
31
15
|
import { strings, numbers } from './constants';
|
|
@@ -34,7 +18,7 @@ import { pullAll, withOrderSort } from '../utils/array';
|
|
|
34
18
|
|
|
35
19
|
class TableFoundation extends BaseFoundation {
|
|
36
20
|
constructor(adapter) {
|
|
37
|
-
super(
|
|
21
|
+
super(Object.assign({}, adapter));
|
|
38
22
|
/**
|
|
39
23
|
* set page number
|
|
40
24
|
*/
|
|
@@ -47,7 +31,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
47
31
|
pagination,
|
|
48
32
|
disabledRowKeys,
|
|
49
33
|
allRowKeys
|
|
50
|
-
} = this.getCurrentPageData(null,
|
|
34
|
+
} = this.getCurrentPageData(null, Object.assign(Object.assign({}, currentPagination), {
|
|
51
35
|
currentPage,
|
|
52
36
|
pageSize: currentPageSize
|
|
53
37
|
}));
|
|
@@ -78,11 +62,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
78
62
|
this._adapter.setCachedFilteredSortedRowKeys(filteredSortedRowKeys);
|
|
79
63
|
};
|
|
80
64
|
|
|
81
|
-
this.isSortOrderValid = sortOrder =>
|
|
82
|
-
var _context;
|
|
83
|
-
|
|
84
|
-
return _includesInstanceProperty(_context = strings.SORT_DIRECTIONS).call(_context, sortOrder) || sortOrder === false;
|
|
85
|
-
};
|
|
65
|
+
this.isSortOrderValid = sortOrder => strings.SORT_DIRECTIONS.includes(sortOrder) || sortOrder === false;
|
|
86
66
|
/**
|
|
87
67
|
* memoized function list
|
|
88
68
|
*/
|
|
@@ -130,12 +110,12 @@ class TableFoundation extends BaseFoundation {
|
|
|
130
110
|
const expandedRowKeys = [];
|
|
131
111
|
|
|
132
112
|
if (defaultExpandAllRows || expandAllRows) {
|
|
133
|
-
this._addNoDuplicatedItemsToArr(expandedRowKeys, this.getAllRowKeys(dataSource), groups && _isMap(groups) && groups.size ?
|
|
113
|
+
this._addNoDuplicatedItemsToArr(expandedRowKeys, this.getAllRowKeys(dataSource), groups && _isMap(groups) && groups.size ? Array.from(groups.keys()) : []);
|
|
134
114
|
} else if (defaultExpandAllGroupRows || expandAllGroupRows) {
|
|
135
|
-
this._addNoDuplicatedItemsToArr(expandedRowKeys, groups && _isMap(groups) && groups.size ?
|
|
136
|
-
} else if (
|
|
115
|
+
this._addNoDuplicatedItemsToArr(expandedRowKeys, groups && _isMap(groups) && groups.size ? Array.from(groups.keys()) : []);
|
|
116
|
+
} else if (Array.isArray(defaultExpandedRowKeys) && defaultExpandedRowKeys.length) {
|
|
137
117
|
this._addNoDuplicatedItemsToArr(expandedRowKeys, defaultExpandedRowKeys);
|
|
138
|
-
} else if (
|
|
118
|
+
} else if (Array.isArray(propExpandedRowKeys) && propExpandedRowKeys.length) {
|
|
139
119
|
this._addNoDuplicatedItemsToArr(expandedRowKeys, propExpandedRowKeys);
|
|
140
120
|
}
|
|
141
121
|
|
|
@@ -154,13 +134,13 @@ class TableFoundation extends BaseFoundation {
|
|
|
154
134
|
|
|
155
135
|
const defaultSelectedRowKeys = _get(rowSelection, 'defaultSelectedRowKeys');
|
|
156
136
|
|
|
157
|
-
if (
|
|
137
|
+
if (Array.isArray(selectedRowKeys)) {
|
|
158
138
|
this._addNoDuplicatedItemsToArr(rowKeys, selectedRowKeys);
|
|
159
|
-
} else if (
|
|
139
|
+
} else if (Array.isArray(defaultSelectedRowKeys)) {
|
|
160
140
|
this._addNoDuplicatedItemsToArr(rowKeys, defaultSelectedRowKeys);
|
|
161
141
|
}
|
|
162
142
|
|
|
163
|
-
if (
|
|
143
|
+
if (Array.isArray(disabledRowKeys) && disabledRowKeys.length) {
|
|
164
144
|
_pull(rowKeys, ...disabledRowKeys);
|
|
165
145
|
}
|
|
166
146
|
|
|
@@ -176,7 +156,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
176
156
|
|
|
177
157
|
|
|
178
158
|
getFilteredSortedDataSource(dataSource, queries) {
|
|
179
|
-
const filteredDataSource = this.filterDataSource(dataSource,
|
|
159
|
+
const filteredDataSource = this.filterDataSource(dataSource, queries.filter(query => {
|
|
180
160
|
/**
|
|
181
161
|
* 这里无需判断 filteredValue 是否为数组,初始化时它是 `undefined`,点击选择空时为 `[]`
|
|
182
162
|
* 初始化时我们应该用 `defaultFilteredValue`,点击后我们应该用 `filteredValue`
|
|
@@ -185,9 +165,9 @@ class TableFoundation extends BaseFoundation {
|
|
|
185
165
|
* When initializing we should use `defaultFilteredValue`, after clicking we should use `filteredValue`
|
|
186
166
|
*/
|
|
187
167
|
const currentFilteredValue = query.filteredValue ? query.filteredValue : query.defaultFilteredValue;
|
|
188
|
-
return _isFunction(query.onFilter) &&
|
|
168
|
+
return _isFunction(query.onFilter) && Array.isArray(query.filters) && query.filters.length && Array.isArray(currentFilteredValue) && currentFilteredValue.length;
|
|
189
169
|
}));
|
|
190
|
-
const sortedDataSource = this.sortDataSource(filteredDataSource,
|
|
170
|
+
const sortedDataSource = this.sortDataSource(filteredDataSource, queries.filter(query => query && _isFunction(query.sorter)));
|
|
191
171
|
return sortedDataSource;
|
|
192
172
|
}
|
|
193
173
|
/**
|
|
@@ -204,7 +184,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
204
184
|
const filteredSortedDataSource = this._adapter.getCachedFilteredSortedDataSource();
|
|
205
185
|
|
|
206
186
|
dataSource = dataSource == null ? [...filteredSortedDataSource] : dataSource;
|
|
207
|
-
pagination = pagination == null ? this.getState('pagination') &&
|
|
187
|
+
pagination = pagination == null ? this.getState('pagination') && Object.assign({}, this.getState('pagination')) : pagination;
|
|
208
188
|
queries = queries == null ? [...this.getState('queries')] : queries;
|
|
209
189
|
let groups;
|
|
210
190
|
|
|
@@ -241,7 +221,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
241
221
|
|
|
242
222
|
groupDataSource(dataSource, groupBy) {
|
|
243
223
|
groupBy = groupBy == null ? this.getProp('groupBy') : groupBy;
|
|
244
|
-
const groups = new
|
|
224
|
+
const groups = new Map();
|
|
245
225
|
const newDataSource = [];
|
|
246
226
|
|
|
247
227
|
if (groupBy != null) {
|
|
@@ -253,7 +233,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
253
233
|
let group = groups.get(groupKey);
|
|
254
234
|
|
|
255
235
|
if (!_isSet(group)) {
|
|
256
|
-
group = new
|
|
236
|
+
group = new Set([recordKey]);
|
|
257
237
|
groups.set(groupKey, group);
|
|
258
238
|
} else {
|
|
259
239
|
group.add(recordKey);
|
|
@@ -263,9 +243,9 @@ class TableFoundation extends BaseFoundation {
|
|
|
263
243
|
}
|
|
264
244
|
|
|
265
245
|
if (groups && groups.size) {
|
|
266
|
-
|
|
246
|
+
groups.forEach((set, key) => {
|
|
267
247
|
if (_isSet(set)) {
|
|
268
|
-
|
|
248
|
+
set.forEach(realKey => {
|
|
269
249
|
newDataSource.push(this._getRecord(realKey));
|
|
270
250
|
});
|
|
271
251
|
}
|
|
@@ -290,8 +270,6 @@ class TableFoundation extends BaseFoundation {
|
|
|
290
270
|
|
|
291
271
|
sortDataSource(dataSource, sorters) {
|
|
292
272
|
_each(sorters, sorterObj => {
|
|
293
|
-
var _context2;
|
|
294
|
-
|
|
295
273
|
// const sorterObj = last(sorters) || {};
|
|
296
274
|
const {
|
|
297
275
|
sorter,
|
|
@@ -301,14 +279,14 @@ class TableFoundation extends BaseFoundation {
|
|
|
301
279
|
} = sorterObj;
|
|
302
280
|
const currentSortOrder = this.isSortOrderValid(sortOrder) ? sortOrder : defaultSortOrder;
|
|
303
281
|
|
|
304
|
-
if (_isFunction(sorter) && currentSortOrder &&
|
|
282
|
+
if (_isFunction(sorter) && currentSortOrder && strings.SORT_DIRECTIONS.includes(currentSortOrder)) {
|
|
305
283
|
if (sortChildrenRecord) {
|
|
306
284
|
const childrenRecordName = this.getProp('childrenRecordName');
|
|
307
|
-
dataSource = dataSource &&
|
|
285
|
+
dataSource = dataSource && dataSource.map(record => {
|
|
308
286
|
const children = this._getRecordChildren(record);
|
|
309
287
|
|
|
310
|
-
if (
|
|
311
|
-
return
|
|
288
|
+
if (Array.isArray(children) && children.length) {
|
|
289
|
+
return Object.assign(Object.assign({}, record), {
|
|
312
290
|
[childrenRecordName]: this.sortDataSource(children, [sorterObj])
|
|
313
291
|
});
|
|
314
292
|
}
|
|
@@ -317,8 +295,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
317
295
|
});
|
|
318
296
|
}
|
|
319
297
|
|
|
320
|
-
|
|
321
|
-
|
|
298
|
+
dataSource.sort(withOrderSort(sorter, currentSortOrder));
|
|
322
299
|
return false;
|
|
323
300
|
}
|
|
324
301
|
|
|
@@ -348,16 +325,16 @@ class TableFoundation extends BaseFoundation {
|
|
|
348
325
|
filterChildrenRecord,
|
|
349
326
|
defaultFilteredValue
|
|
350
327
|
} = filterObj;
|
|
351
|
-
const currentFilteredValue =
|
|
328
|
+
const currentFilteredValue = Array.isArray(filteredValue) ? filteredValue : defaultFilteredValue;
|
|
352
329
|
|
|
353
|
-
if (typeof onFilter === 'function' &&
|
|
330
|
+
if (typeof onFilter === 'function' && Array.isArray(currentFilteredValue) && currentFilteredValue.length) {
|
|
354
331
|
hasValidFilters = true;
|
|
355
332
|
|
|
356
333
|
if (filteredData === null) {
|
|
357
|
-
filteredData = new
|
|
334
|
+
filteredData = new Map();
|
|
358
335
|
} else {
|
|
359
|
-
dataSource =
|
|
360
|
-
filteredData = new
|
|
336
|
+
dataSource = Array.from(filteredData && filteredData.values());
|
|
337
|
+
filteredData = new Map();
|
|
361
338
|
}
|
|
362
339
|
|
|
363
340
|
_each(dataSource, record => {
|
|
@@ -367,17 +344,17 @@ class TableFoundation extends BaseFoundation {
|
|
|
367
344
|
const recordKey = this.getRecordKey(record);
|
|
368
345
|
let filteredChildren;
|
|
369
346
|
|
|
370
|
-
if (
|
|
347
|
+
if (Array.isArray(childrenRecords) && childrenRecords.length && filterChildrenRecord) {
|
|
371
348
|
filteredChildren = this.filterDataSource(childrenRecords, [filterObj]);
|
|
372
349
|
}
|
|
373
350
|
|
|
374
|
-
if (
|
|
351
|
+
if (Array.isArray(filteredChildren) && filteredChildren.length) {
|
|
375
352
|
if (recordKey != null) {
|
|
376
353
|
const children = _get(filteredData.get(recordKey), childrenRecordName, []);
|
|
377
354
|
|
|
378
|
-
filteredData.set(recordKey,
|
|
379
|
-
[childrenRecordName]:
|
|
380
|
-
if (
|
|
355
|
+
filteredData.set(recordKey, Object.assign(Object.assign({}, record), {
|
|
356
|
+
[childrenRecordName]: filteredChildren.reduce((arr, cur) => {
|
|
357
|
+
if (arr.find(item => this.getRecordKey(item) === this.getRecordKey(cur)) == null) {
|
|
381
358
|
arr.push(cur);
|
|
382
359
|
}
|
|
383
360
|
|
|
@@ -394,7 +371,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
394
371
|
});
|
|
395
372
|
|
|
396
373
|
if (hasValidFilters) {
|
|
397
|
-
dataSource =
|
|
374
|
+
dataSource = Array.from(filteredData && filteredData.values());
|
|
398
375
|
}
|
|
399
376
|
|
|
400
377
|
return dataSource;
|
|
@@ -425,7 +402,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
425
402
|
const propPagination = this.getProp('pagination');
|
|
426
403
|
|
|
427
404
|
if (pagination) {
|
|
428
|
-
pagination = typeof pagination === 'object' ?
|
|
405
|
+
pagination = typeof pagination === 'object' ? Object.assign({}, pagination) : {};
|
|
429
406
|
pagination = _merge({
|
|
430
407
|
total: dataSource && dataSource.length || 0,
|
|
431
408
|
pageSize: numbers.DEFAULT_PAGE_SIZE,
|
|
@@ -510,9 +487,9 @@ class TableFoundation extends BaseFoundation {
|
|
|
510
487
|
}
|
|
511
488
|
|
|
512
489
|
for (const objArr of objArrs) {
|
|
513
|
-
if (
|
|
490
|
+
if (Array.isArray(objArr)) {
|
|
514
491
|
for (const item of objArr) {
|
|
515
|
-
if (!
|
|
492
|
+
if (!srcArr.includes(item)) {
|
|
516
493
|
srcArr.push(item);
|
|
517
494
|
}
|
|
518
495
|
}
|
|
@@ -532,15 +509,15 @@ class TableFoundation extends BaseFoundation {
|
|
|
532
509
|
}
|
|
533
510
|
|
|
534
511
|
this._adapter.notifyChange({
|
|
535
|
-
pagination:
|
|
512
|
+
pagination: Object.assign({}, pagination),
|
|
536
513
|
filters: [...filters],
|
|
537
514
|
sorter,
|
|
538
|
-
extra:
|
|
515
|
+
extra: Object.assign({}, extra)
|
|
539
516
|
});
|
|
540
517
|
}
|
|
541
518
|
|
|
542
519
|
_rowExpansionIsControlled() {
|
|
543
|
-
return
|
|
520
|
+
return Array.isArray(this.getProp('expandedRowKeys'));
|
|
544
521
|
}
|
|
545
522
|
|
|
546
523
|
_pagerIsControlled() {
|
|
@@ -548,7 +525,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
548
525
|
}
|
|
549
526
|
|
|
550
527
|
_selectionIsControlled() {
|
|
551
|
-
return
|
|
528
|
+
return Array.isArray(_get(this.getProp('rowSelection'), 'selectedRowKeys'));
|
|
552
529
|
}
|
|
553
530
|
/**
|
|
554
531
|
* Determine whether the column sorting is controlled
|
|
@@ -573,7 +550,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
573
550
|
|
|
574
551
|
_filterIsControlled(dataIndex) {
|
|
575
552
|
const query = dataIndex && this.getQuery(dataIndex, this.getState('flattenColumns'));
|
|
576
|
-
return Boolean(query &&
|
|
553
|
+
return Boolean(query && Array.isArray(query.filteredValue));
|
|
577
554
|
}
|
|
578
555
|
|
|
579
556
|
_filterShowIsControlled(dataIndex) {
|
|
@@ -592,7 +569,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
592
569
|
_getSelectedRowKeysSet() {
|
|
593
570
|
const rowSelection = this.getState('rowSelection');
|
|
594
571
|
|
|
595
|
-
const selectedRowKeysSet = _get(rowSelection, 'selectedRowKeysSet', new
|
|
572
|
+
const selectedRowKeysSet = _get(rowSelection, 'selectedRowKeysSet', new Set());
|
|
596
573
|
|
|
597
574
|
return selectedRowKeysSet;
|
|
598
575
|
}
|
|
@@ -618,7 +595,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
618
595
|
const filters = [];
|
|
619
596
|
|
|
620
597
|
_each(queries, query => {
|
|
621
|
-
if (
|
|
598
|
+
if (Array.isArray(query.filteredValue) && (query.filteredValue.length || this._filterIsControlled(query.dataIndex))) {
|
|
622
599
|
filters.push(query);
|
|
623
600
|
}
|
|
624
601
|
});
|
|
@@ -656,7 +633,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
656
633
|
let keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['dataIndex'];
|
|
657
634
|
queries = queries == null ? this.getState('queries') : queries;
|
|
658
635
|
queries = [...queries];
|
|
659
|
-
query =
|
|
636
|
+
query = Object.assign({}, query);
|
|
660
637
|
|
|
661
638
|
const {
|
|
662
639
|
filteredQueries,
|
|
@@ -665,7 +642,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
665
642
|
|
|
666
643
|
_each(filteredQueries, (curQuery, idx) => {
|
|
667
644
|
// assign(curQuery, query);
|
|
668
|
-
queries[filteredIndexes[idx]] =
|
|
645
|
+
queries[filteredIndexes[idx]] = Object.assign({}, query);
|
|
669
646
|
});
|
|
670
647
|
|
|
671
648
|
return queries;
|
|
@@ -688,7 +665,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
688
665
|
|
|
689
666
|
isEmpty(dataSource) {
|
|
690
667
|
dataSource = dataSource == null ? this.getProp('dataSource') : dataSource;
|
|
691
|
-
return !(
|
|
668
|
+
return !(Array.isArray(dataSource) && dataSource.length > 0);
|
|
692
669
|
}
|
|
693
670
|
|
|
694
671
|
handleSelectRow(realKey, selected, e) {
|
|
@@ -701,9 +678,8 @@ class TableFoundation extends BaseFoundation {
|
|
|
701
678
|
const selectedRow = this.getSelectedRows(null, [realKey])[0];
|
|
702
679
|
let selectedRows;
|
|
703
680
|
|
|
704
|
-
if ((foundIdx =
|
|
705
|
-
|
|
706
|
-
|
|
681
|
+
if ((foundIdx = selectedRowKeys.indexOf(realKey)) > -1 && selected === false) {
|
|
682
|
+
selectedRowKeys.splice(foundIdx, 1);
|
|
707
683
|
selectedRows = this.getSelectedRows(null, selectedRowKeys);
|
|
708
684
|
|
|
709
685
|
if (!this._selectionIsControlled()) {
|
|
@@ -713,7 +689,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
713
689
|
this._adapter.notifySelect(selectedRow, selected, selectedRows, e);
|
|
714
690
|
|
|
715
691
|
this._adapter.notifySelectionChange(selectedRowKeys, selectedRows);
|
|
716
|
-
} else if (
|
|
692
|
+
} else if (selectedRowKeys.indexOf(realKey) === -1 && selected === true) {
|
|
717
693
|
selectedRowKeys.push(realKey);
|
|
718
694
|
selectedRows = this.getSelectedRows(null, selectedRowKeys);
|
|
719
695
|
|
|
@@ -746,7 +722,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
746
722
|
|
|
747
723
|
let allRowKeys = [...this._adapter.getCachedFilteredSortedRowKeys()];
|
|
748
724
|
const disabledRowKeys = this.getAllDisabledRowKeys();
|
|
749
|
-
const disabledRowKeysSet = new
|
|
725
|
+
const disabledRowKeysSet = new Set(disabledRowKeys);
|
|
750
726
|
let changedRowKeys; // Select all, if not disabled && not in selectedRowKeys
|
|
751
727
|
|
|
752
728
|
if (selected) {
|
|
@@ -788,21 +764,21 @@ class TableFoundation extends BaseFoundation {
|
|
|
788
764
|
selectedRowKeys = selectedRowKeys == null ? this._getSelectedRowKeys() : selectedRowKeys;
|
|
789
765
|
|
|
790
766
|
if (!_isSet(selectedRowKeysSet)) {
|
|
791
|
-
selectedRowKeysSet = new
|
|
767
|
+
selectedRowKeysSet = new Set(selectedRowKeys);
|
|
792
768
|
}
|
|
793
769
|
|
|
794
770
|
const childrenRecordName = this.getProp('childrenRecordName');
|
|
795
771
|
const selectedRows = [];
|
|
796
772
|
|
|
797
|
-
if (_isSet(selectedRowKeysSet) && selectedRowKeysSet.size &&
|
|
773
|
+
if (_isSet(selectedRowKeysSet) && selectedRowKeysSet.size && Array.isArray(dataSource) && dataSource.length) {
|
|
798
774
|
// Time complexity optimization, replace the includes operation of array with has of set
|
|
799
|
-
selectedRows.push(...
|
|
775
|
+
selectedRows.push(...dataSource.filter(data => selectedRowKeysSet.has(this.getRecordKey(data))));
|
|
800
776
|
|
|
801
777
|
if (selectedRows.length < selectedRowKeys.length) {
|
|
802
778
|
for (const item of dataSource) {
|
|
803
779
|
const children = _get(item, childrenRecordName);
|
|
804
780
|
|
|
805
|
-
if (
|
|
781
|
+
if (Array.isArray(children) && children.length) {
|
|
806
782
|
const rows = this.getSelectedRows(children, selectedRowKeys, selectedRowKeysSet);
|
|
807
783
|
selectedRows.push(...rows);
|
|
808
784
|
}
|
|
@@ -819,7 +795,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
819
795
|
const childrenRecordName = this.getProp('childrenRecordName');
|
|
820
796
|
const disabledRowKeys = [];
|
|
821
797
|
|
|
822
|
-
if (
|
|
798
|
+
if (Array.isArray(dataSource) && dataSource.length && typeof getCheckboxProps === 'function') {
|
|
823
799
|
for (const record of dataSource) {
|
|
824
800
|
const props = getCheckboxProps(record);
|
|
825
801
|
|
|
@@ -829,7 +805,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
829
805
|
|
|
830
806
|
const children = _get(record, childrenRecordName);
|
|
831
807
|
|
|
832
|
-
if (
|
|
808
|
+
if (Array.isArray(children) && children.length) {
|
|
833
809
|
const keys = this.getAllDisabledRowKeys(children, getCheckboxProps);
|
|
834
810
|
disabledRowKeys.push(...keys);
|
|
835
811
|
}
|
|
@@ -844,13 +820,13 @@ class TableFoundation extends BaseFoundation {
|
|
|
844
820
|
const childrenRecordName = this.getProp('childrenRecordName');
|
|
845
821
|
const allRowKeys = [];
|
|
846
822
|
|
|
847
|
-
if (
|
|
823
|
+
if (Array.isArray(dataSource) && dataSource.length) {
|
|
848
824
|
for (const record of dataSource) {
|
|
849
825
|
const childrenRowKeys = [];
|
|
850
826
|
|
|
851
827
|
const children = _get(record, childrenRecordName);
|
|
852
828
|
|
|
853
|
-
if (
|
|
829
|
+
if (Array.isArray(children) && children.length) {
|
|
854
830
|
childrenRowKeys.push(...this.getAllRowKeys(children));
|
|
855
831
|
}
|
|
856
832
|
|
|
@@ -868,7 +844,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
868
844
|
|
|
869
845
|
|
|
870
846
|
hasRowSelected(selectedRowKeys, allRowKeysSet) {
|
|
871
|
-
return Boolean(
|
|
847
|
+
return Boolean(Array.isArray(selectedRowKeys) && selectedRowKeys.length && _isSet(allRowKeysSet) && allRowKeysSet.size && selectedRowKeys.filter(key => allRowKeysSet.has(key)).length);
|
|
872
848
|
}
|
|
873
849
|
/**
|
|
874
850
|
* expand processing function
|
|
@@ -881,15 +857,13 @@ class TableFoundation extends BaseFoundation {
|
|
|
881
857
|
handleRowExpanded(expanded, realKey, domEvent) {
|
|
882
858
|
this.stopPropagation(domEvent);
|
|
883
859
|
const expandedRowKeys = [...this.getState('expandedRowKeys')];
|
|
884
|
-
|
|
885
|
-
const index = _indexOfInstanceProperty(expandedRowKeys).call(expandedRowKeys, realKey);
|
|
886
|
-
|
|
860
|
+
const index = expandedRowKeys.indexOf(realKey);
|
|
887
861
|
const keyIsValid = typeof realKey === 'string' || typeof realKey === 'number';
|
|
888
862
|
|
|
889
863
|
if (keyIsValid && expanded && index === -1) {
|
|
890
864
|
expandedRowKeys.push(realKey);
|
|
891
865
|
} else if (keyIsValid && !expanded && index > -1) {
|
|
892
|
-
|
|
866
|
+
expandedRowKeys.splice(index, 1);
|
|
893
867
|
}
|
|
894
868
|
|
|
895
869
|
if (!this._rowExpansionIsControlled()) {
|
|
@@ -972,7 +946,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
972
946
|
|
|
973
947
|
allIsNotSelected(selectedRowKeys, allKeys) {
|
|
974
948
|
for (const key of allKeys) {
|
|
975
|
-
if (key != null &&
|
|
949
|
+
if (key != null && Array.isArray(selectedRowKeys) && selectedRowKeys.includes(key)) {
|
|
976
950
|
return true;
|
|
977
951
|
}
|
|
978
952
|
}
|
|
@@ -1010,7 +984,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
1010
984
|
let filterObj = this.getQuery(dataIndex);
|
|
1011
985
|
const filterDropdownVisible = visible; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1012
986
|
|
|
1013
|
-
filterObj =
|
|
987
|
+
filterObj = Object.assign(Object.assign({}, filterObj), {
|
|
1014
988
|
filterDropdownVisible
|
|
1015
989
|
});
|
|
1016
990
|
|
|
@@ -1036,7 +1010,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
1036
1010
|
const {
|
|
1037
1011
|
filteredValue
|
|
1038
1012
|
} = data;
|
|
1039
|
-
query =
|
|
1013
|
+
query = Object.assign(Object.assign({}, query), {
|
|
1040
1014
|
filteredValue
|
|
1041
1015
|
});
|
|
1042
1016
|
queries = mergeQueries(query, queries);
|
|
@@ -1073,7 +1047,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
1073
1047
|
|
|
1074
1048
|
_each(queries, (query, idx, arr) => {
|
|
1075
1049
|
if (query.sorter) {
|
|
1076
|
-
const sorterObj =
|
|
1050
|
+
const sorterObj = Object.assign({}, query);
|
|
1077
1051
|
|
|
1078
1052
|
const stateSortOrder = _get(sorterObj, 'sortOrder');
|
|
1079
1053
|
|
|
@@ -1094,7 +1068,7 @@ class TableFoundation extends BaseFoundation {
|
|
|
1094
1068
|
querySortOrder = false;
|
|
1095
1069
|
}
|
|
1096
1070
|
|
|
1097
|
-
arr[idx] =
|
|
1071
|
+
arr[idx] = Object.assign(Object.assign({}, sorterObj), {
|
|
1098
1072
|
sortOrder: querySortOrder
|
|
1099
1073
|
});
|
|
1100
1074
|
|