2023-05-25 13:53:42 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
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,
|
|
|
|
disabled: Boolean,
|
|
|
|
dataKey: null,
|
|
|
|
multiple: Boolean,
|
|
|
|
metaKeySelection: Boolean,
|
|
|
|
filter: Boolean,
|
|
|
|
filterPlaceholder: String,
|
|
|
|
filterLocale: String,
|
|
|
|
filterMatchMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'contains'
|
|
|
|
},
|
|
|
|
filterFields: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
filterInputProps: null,
|
|
|
|
virtualScrollerOptions: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
autoOptionFocus: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
selectOnFocus: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
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
|
|
|
|
},
|
|
|
|
'aria-label': {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
'aria-labelledby': {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: ListboxStyle,
|
2023-05-30 11:06:57 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-25 13:53:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|