WIP rework search
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
.flex.flex-col.gap-y-2
|
||||
base-input-container(:label="label", :style="{width: width, ...sizeVariable}")
|
||||
q-select.select(
|
||||
ref="selectRef"
|
||||
v-model="value",
|
||||
:options="items",
|
||||
:readonly="readonly"
|
||||
@@ -15,17 +16,13 @@
|
||||
dropdown-icon="app:down-arrow",
|
||||
:menu-offset="[0, 8]",
|
||||
:use-input="useInput",
|
||||
:input-debounce="inputDebounce",
|
||||
:placeholder="useInput && placeholder ? placeholder : ''",
|
||||
@filter="filterFn",
|
||||
:popup-content-style="popupContentStyle"
|
||||
)
|
||||
template(v-slot:selected)
|
||||
span(v-if="!value?.icon", :class="placeholderColor") {{ textSelect }}
|
||||
q-icon.selected-icon(
|
||||
v-else,
|
||||
:name="iconSelect",
|
||||
size="24px"
|
||||
)
|
||||
slot(name="selected")
|
||||
template(v-slot:option="scope", v-if="!customOption")
|
||||
q-item(v-bind="scope.itemProps", style="justify-content: center", v-if="value?.icon")
|
||||
q-item-section(avatar, style="padding: 0px; min-width: 0px")
|
||||
@@ -37,9 +34,7 @@
|
||||
slot(
|
||||
name="customOption",
|
||||
:props="itemProps",
|
||||
:label="opt.label"
|
||||
:avatar="opt.avatar",
|
||||
:medcard="opt.medcard"
|
||||
:data="opt"
|
||||
)
|
||||
template(v-slot:prepend, v-if="iconLeft")
|
||||
slot(name="iconLeft")
|
||||
@@ -77,6 +72,7 @@ export default {
|
||||
clearable: Boolean,
|
||||
size: String,
|
||||
useInput: Boolean,
|
||||
inputDebounce: Number,
|
||||
iconLeft: Boolean,
|
||||
iconRight: Boolean,
|
||||
customOption: Boolean,
|
||||
@@ -163,6 +159,11 @@ export default {
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateInputValue(value, noFilter) {
|
||||
this.$refs?.selectRef?.updateInputValue(value, noFilter);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="sass">
|
||||
|
||||
Reference in New Issue
Block a user