0
0
Fork 0

refs #6280: remove related code to filter-rules

This commit is contained in:
Javier Segarra 2024-01-26 07:56:41 +00:00
parent 45dc9c355f
commit 9f9835b7ab
1 changed files with 2 additions and 13 deletions

View File

@ -12,15 +12,11 @@ const $props = defineProps({
default: () => [],
},
optionLabel: {
type: [String, Function],
type: [String],
default: '',
},
filterOptions: {
type: [Array, Function],
default: () => [],
},
filterRules: {
type: [Array, Function],
type: [Array],
default: () => [],
},
isClearable: {
@ -57,13 +53,6 @@ const filter = (val, options) => {
const search = val.toString().toLowerCase();
if (!search) return options;
if($props.filterRules.length) {
const passSomeRule = $props.filterRules.some((rule) => {
const cond = eval(rule)
return cond;
});
if(!passSomeRule) return options
}
return options.filter((row) => {
if ($props.filterOptions.length) {