2023-05-23 09:13:26 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import DropdownStyle from 'primevue/dropdown/style';
|
2023-05-23 09:13:26 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseDropdown',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: null,
|
|
|
|
options: Array,
|
2023-08-01 05:29:19 +00:00
|
|
|
optionLabel: [String, Function],
|
|
|
|
optionValue: [String, Function],
|
|
|
|
optionDisabled: [String, Function],
|
|
|
|
optionGroupLabel: [String, Function],
|
|
|
|
optionGroupChildren: [String, Function],
|
2023-05-23 09:13:26 +00:00
|
|
|
scrollHeight: {
|
|
|
|
type: String,
|
|
|
|
default: '200px'
|
|
|
|
},
|
|
|
|
filter: Boolean,
|
|
|
|
filterPlaceholder: String,
|
|
|
|
filterLocale: String,
|
|
|
|
filterMatchMode: {
|
|
|
|
type: String,
|
|
|
|
default: 'contains'
|
|
|
|
},
|
|
|
|
filterFields: {
|
|
|
|
type: Array,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
editable: Boolean,
|
|
|
|
placeholder: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
disabled: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
dataKey: null,
|
|
|
|
showClear: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
inputId: {
|
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
inputClass: {
|
|
|
|
type: [String, Object],
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
inputStyle: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
inputProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
panelClass: {
|
|
|
|
type: [String, Object],
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
panelStyle: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
panelProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
filterInputProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
clearIconProps: {
|
|
|
|
type: null,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
appendTo: {
|
|
|
|
type: String,
|
|
|
|
default: 'body'
|
|
|
|
},
|
|
|
|
loading: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
clearIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
dropdownIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
filterIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
loadingIcon: {
|
|
|
|
type: String,
|
|
|
|
default: undefined
|
|
|
|
},
|
|
|
|
resetFilterOnHide: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
virtualScrollerOptions: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
},
|
|
|
|
autoOptionFocus: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
autoFilterFocus: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
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
|
|
|
|
},
|
|
|
|
tabindex: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
2023-11-24 12:15:40 +00:00
|
|
|
ariaLabel: {
|
2023-05-23 09:13:26 +00:00
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
},
|
2023-11-24 12:15:40 +00:00
|
|
|
ariaLabelledby: {
|
2023-05-23 09:13:26 +00:00
|
|
|
type: String,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: DropdownStyle,
|
2023-05-30 11:03:42 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-05-23 09:13:26 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|