evui 3.4.12 → 3.4.13
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/evui.common.js +19 -9
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +19 -9
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/grid/uses.js +19 -8
package/package.json
CHANGED
|
@@ -775,11 +775,14 @@ export const filterEvent = (params) => {
|
|
|
775
775
|
const originStore = stores.originStore;
|
|
776
776
|
let filterStore = [];
|
|
777
777
|
let filteredOnce = false;
|
|
778
|
+
let prevStore = [];
|
|
778
779
|
|
|
779
|
-
fields.forEach((field) => {
|
|
780
|
+
fields.forEach((field, idx) => {
|
|
780
781
|
const filters = filteringItemsByColumn[field];
|
|
781
782
|
const index = getColumnIndex(field);
|
|
782
783
|
const columnType = props.columns[index].type;
|
|
784
|
+
const OR = idx > 0 && filterInfo.columnOperator === 'or';
|
|
785
|
+
const AND = idx > 0 && filterInfo.columnOperator === 'and';
|
|
783
786
|
|
|
784
787
|
filters.forEach((item, ix) => {
|
|
785
788
|
if (!filterStore.length && !filteredOnce) {
|
|
@@ -787,17 +790,24 @@ export const filterEvent = (params) => {
|
|
|
787
790
|
...item,
|
|
788
791
|
index,
|
|
789
792
|
});
|
|
790
|
-
} else if (
|
|
791
|
-
|
|
792
|
-
...
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
793
|
+
} else if (AND && item.operator === 'or') {
|
|
794
|
+
if (ix > 0) {
|
|
795
|
+
filterStore.push(...getFilteringData(prevStore, columnType, {
|
|
796
|
+
...item,
|
|
797
|
+
index,
|
|
798
|
+
}));
|
|
799
|
+
} else { // ix === 0
|
|
800
|
+
filterStore = getFilteringData(prevStore, columnType, {
|
|
801
|
+
...item,
|
|
802
|
+
index,
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
} else if (OR || item.operator === 'or') {
|
|
796
806
|
filterStore.push(...getFilteringData(originStore, columnType, {
|
|
797
807
|
...item,
|
|
798
808
|
index,
|
|
799
809
|
}));
|
|
800
|
-
} else {
|
|
810
|
+
} else {
|
|
801
811
|
filterStore = getFilteringData(filterStore, columnType, {
|
|
802
812
|
...item,
|
|
803
813
|
index,
|
|
@@ -805,6 +815,7 @@ export const filterEvent = (params) => {
|
|
|
805
815
|
}
|
|
806
816
|
filteredOnce = true;
|
|
807
817
|
});
|
|
818
|
+
prevStore = JSON.parse(JSON.stringify(filterStore));
|
|
808
819
|
});
|
|
809
820
|
|
|
810
821
|
if (!filteredOnce) {
|