2
0
mirror of https://github.com/frappe/books.git synced 2024-11-13 00:46:28 +00:00

fix: Rename toggleDropdown to togglePopover

This commit is contained in:
Faris Ansari 2020-01-28 18:32:05 +05:30
parent fba7df7e10
commit 12a43db274
3 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<template>
<Popover @open="selectCurrentMonthYear">
<template v-slot:target="{ toggleDropdown }">
<div @click="!readonly ? toggleDropdown() : null">
<template v-slot:target="{ togglePopover }">
<div @click="!readonly ? togglePopover() : null">
<span v-if="value">
{{ formatValue ? formatValue(value) : value }}
</span>
@ -13,7 +13,7 @@
</span>
</div>
</template>
<template v-slot:content="{ toggleDropdown }">
<template v-slot:content="{ togglePopover }">
<div class="text-left p-3 select-none">
<div class="flex items-center justify-between">
<span class="font-medium text-blue-500 text-base">
@ -64,7 +64,7 @@
}"
@click="
selectDate(date);
toggleDropdown();
togglePopover();
"
>
{{ date.getDate() }}

View File

@ -1,7 +1,7 @@
<template>
<Popover @close="emitFilterChange" right>
<template v-slot:target="{ toggleDropdown }">
<Button :icon="true" @click="toggleDropdown()">
<template v-slot:target="{ togglePopover }">
<Button :icon="true" @click="togglePopover()">
<span class="flex items-center">
<Icon name="filter" size="12" class="stroke-current text-gray-800" />
<span class="ml-2 text-base text-black">
@ -19,7 +19,7 @@
<div class="p-3">
<template v-if="filters.length">
<div
:key="frappe.getRandomString()"
:key="filter.fieldname + frappe.getRandomString()"
v-for="(filter, i) in filters"
class="flex items-center justify-between text-base"
:class="i !== 0 && 'mt-2'"

View File

@ -1,7 +1,7 @@
<template>
<div ref="reference">
<div class="h-full">
<slot name="target" :toggleDropdown="toggleDropdown"></slot>
<slot name="target" :togglePopover="togglePopover"></slot>
</div>
<portal to="popovers">
<div
@ -10,7 +10,7 @@
class="mt-1 bg-white rounded border min-w-40 shadow-md"
v-show="isOpen"
>
<slot name="content" :toggleDropdown="toggleDropdown"></slot>
<slot name="content" :togglePopover="togglePopover"></slot>
</div>
</portal>
</div>
@ -59,7 +59,7 @@ export default {
this.popper.scheduleUpdate();
}
},
toggleDropdown(flag) {
togglePopover(flag) {
if (flag == null) {
flag = !this.isOpen;
}