refs #6694 VnLocation #154
|
@ -12,15 +12,11 @@ const $props = defineProps({
|
|||
default: () => [],
|
||||
},
|
||||
optionLabel: {
|
||||
type: [String, Function],
|
||||
type: [String],
|
||||
jsegarra marked this conversation as resolved
Outdated
|
||||
default: '',
|
||||
},
|
||||
filterOptions: {
|
||||
type: [Array, Function],
|
||||
default: () => [],
|
||||
},
|
||||
filterRules: {
|
||||
type: [Array, Function],
|
||||
type: [Array],
|
||||
jsegarra marked this conversation as resolved
Outdated
alexm
commented
No veo el pq hacerlo function No veo el pq hacerlo function
alexm
commented
No veo el pq hacerlo function No veo el pq hacerlo function
|
||||
default: () => [],
|
||||
},
|
||||
isClearable: {
|
||||
jsegarra marked this conversation as resolved
Outdated
alexm
commented
No veo que se use No veo que se use
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
No veo el pq hacerlo function