commit
b6b90246ee
@ -34,7 +34,7 @@
|
|||||||
v-if="!show_date"
|
v-if="!show_date"
|
||||||
type="text"
|
type="text"
|
||||||
class="w-full h-12 lg:h-auto bg-transparent text-black text-sm border-0 pb-0 focus:outline-none focus:ring-transparent focus:border-purple-100"
|
class="w-full h-12 lg:h-auto bg-transparent text-black text-sm border-0 pb-0 focus:outline-none focus:ring-transparent focus:border-purple-100"
|
||||||
:class="!show_icon ? 'px-4' : 'px-10'"
|
:class="!show_icon ? 'ltr:pr-4 rtl:pl-4' : 'ltr:pr-10 rtl:pl-10'"
|
||||||
:placeholder="dynamicPlaceholder"
|
:placeholder="dynamicPlaceholder"
|
||||||
:ref="'input-search-field-' + _uid"
|
:ref="'input-search-field-' + _uid"
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@ -50,7 +50,7 @@
|
|||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
:config="dateConfig"
|
:config="dateConfig"
|
||||||
class="w-full h-12 lg:h-auto bg-transparent text-black text-sm border-0 pb-0 focus:outline-none focus:ring-transparent focus:border-purple-100 datepicker"
|
class="w-full h-12 lg:h-auto bg-transparent text-black text-sm border-0 pb-0 focus:outline-none focus:ring-transparent focus:border-purple-100 datepicker"
|
||||||
:class="!show_icon ? 'px-4' : 'px-10'"
|
:class="!show_icon ? 'ltr:pr-4 rtl:pl-4' : 'ltr:pr-10 rtl:pl-10'"
|
||||||
:placeholder="dynamicPlaceholder"
|
:placeholder="dynamicPlaceholder"
|
||||||
:ref="'input-search-date-field-' + _uid"
|
:ref="'input-search-date-field-' + _uid"
|
||||||
value=""
|
value=""
|
||||||
@ -59,13 +59,23 @@
|
|||||||
@keyup.enter="onInputConfirm"
|
@keyup.enter="onInputConfirm"
|
||||||
>
|
>
|
||||||
</flat-picker>
|
</flat-picker>
|
||||||
<span
|
|
||||||
v-if="show_icon"
|
<button
|
||||||
class="material-icons absolute bottom-1 ltr:left-3 rtl:right-3 text-lg text-black"
|
v-if="show_icon"
|
||||||
style="z-index:-1;"
|
@focus="onInputFocus"
|
||||||
>
|
v-show="show_button"
|
||||||
search
|
@click="onInputConfirm"
|
||||||
</span>
|
class="absolute ltr:right-0.5 rtl:left-0.5 z-50 mt-3 text-sm text-gray-700 font-medium px-2.5 py-1 h-7 rounded-lg"
|
||||||
|
:class="search.length == 0 ? 'opacity-60 cursor-default' : 'cursor-pointer hover:bg-gray-100'"
|
||||||
|
:disabled="search.length == 0"
|
||||||
|
>
|
||||||
|
<div class="flex">
|
||||||
|
<span>search</span>
|
||||||
|
<span class="material-icons-outlined text-sm ltr:scale-x-100 rtl:-scale-x-100 ltr:ml-1 rtl:mr-1 mt-0.5">
|
||||||
|
keyboard_return
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
|
||||||
<button type="button" class="absolute ltr:right-0 rtl:left-0 top-4 lg:top-2 clear" v-if="show_close_icon" @click="onSearchAndFilterClear">
|
<button type="button" class="absolute ltr:right-0 rtl:left-0 top-4 lg:top-2 clear" v-if="show_close_icon" @click="onSearchAndFilterClear">
|
||||||
<span class="material-icons text-sm">close</span>
|
<span class="material-icons text-sm">close</span>
|
||||||
@ -217,6 +227,7 @@ export default {
|
|||||||
values: [],
|
values: [],
|
||||||
current_value: null,
|
current_value: null,
|
||||||
show_date: false,
|
show_date: false,
|
||||||
|
show_button: false,
|
||||||
show_close_icon: false,
|
show_close_icon: false,
|
||||||
show_icon: true,
|
show_icon: true,
|
||||||
not_equal_image: app_url + "/public/img/tailwind_icons/not-equal.svg",
|
not_equal_image: app_url + "/public/img/tailwind_icons/not-equal.svg",
|
||||||
@ -228,6 +239,8 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onInputFocus() {
|
onInputFocus() {
|
||||||
|
this.show_button = true;
|
||||||
|
|
||||||
if (!this.filter_list.length) {
|
if (!this.filter_list.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -303,6 +316,7 @@ export default {
|
|||||||
|
|
||||||
onInput(evt) {
|
onInput(evt) {
|
||||||
this.search = evt.target.value;
|
this.search = evt.target.value;
|
||||||
|
this.show_button = true;
|
||||||
|
|
||||||
let option_url = this.selected_options.length > 0 && this.selected_options[this.filter_index] !== undefined ? this.selected_options[this.filter_index].url : '';
|
let option_url = this.selected_options.length > 0 && this.selected_options[this.filter_index] !== undefined ? this.selected_options[this.filter_index].url : '';
|
||||||
|
|
||||||
@ -658,6 +672,7 @@ export default {
|
|||||||
this.visible.options = false;
|
this.visible.options = false;
|
||||||
this.visible.operator = false;
|
this.visible.operator = false;
|
||||||
this.visible.values = false;
|
this.visible.values = false;
|
||||||
|
this.show_button = false;
|
||||||
|
|
||||||
document.removeEventListener('click', this.closeIfClickedOutside);
|
document.removeEventListener('click', this.closeIfClickedOutside);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user