primevue-mirror/components/lib/listbox/BaseListbox.vue

106 lines
2.3 KiB
Vue
Raw Normal View History

2023-05-25 13:53:42 +00:00
<script>
import BaseComponent from 'primevue/basecomponent';
import ListboxStyle from 'primevue/listbox/style';
2023-05-25 13:53:42 +00:00
export default {
name: 'BaseListbox',
extends: BaseComponent,
props: {
modelValue: null,
options: Array,
optionLabel: null,
optionValue: null,
optionDisabled: null,
optionGroupLabel: null,
optionGroupChildren: null,
listStyle: null,
invalid: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
2023-05-25 13:53:42 +00:00
dataKey: null,
multiple: {
type: Boolean,
default: false
},
metaKeySelection: {
type: Boolean,
default: false
},
2023-05-25 13:53:42 +00:00
filter: Boolean,
filterPlaceholder: String,
filterLocale: String,
filterMatchMode: {
type: String,
default: 'contains'
},
filterFields: {
type: Array,
default: null
},
virtualScrollerOptions: {
type: Object,
default: null
},
autoOptionFocus: {
type: Boolean,
2024-01-23 14:16:20 +00:00
default: true
2023-05-25 13:53:42 +00:00
},
selectOnFocus: {
type: Boolean,
default: false
},
focusOnHover: {
type: Boolean,
default: true
},
2023-05-25 13:53:42 +00:00
filterMessage: {
type: String,
default: null
},
selectionMessage: {
type: String,
default: null
},
emptySelectionMessage: {
type: String,
default: null
},
emptyFilterMessage: {
type: String,
default: null
},
emptyMessage: {
type: String,
default: null
},
filterIcon: {
type: String,
default: undefined
},
tabindex: {
type: Number,
default: 0
},
ariaLabel: {
2023-05-25 13:53:42 +00:00
type: String,
default: null
},
ariaLabelledby: {
2023-05-25 13:53:42 +00:00
type: String,
default: null
}
},
style: ListboxStyle,
provide() {
return {
$parentInstance: this
};
2023-05-25 13:53:42 +00:00
}
};
</script>