Merge pull request #1460 from nbrylevv/dropdown-trigger-slot
feature - trigger slot for Dropdownpull/1533/head
commit
2670b1e539
|
@ -283,6 +283,10 @@ const DividerSlots = [
|
||||||
{
|
{
|
||||||
name: "loader",
|
name: "loader",
|
||||||
description: "Custom content for the virtual scroller loader items"
|
description: "Custom content for the virtual scroller loader items"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "trigger",
|
||||||
|
description: "Custom content for the component's trigger"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ declare class Dropdown {
|
||||||
empty: VNode[];
|
empty: VNode[];
|
||||||
content: VNode[];
|
content: VNode[];
|
||||||
loader: VNode[];
|
loader: VNode[];
|
||||||
|
trigger: VNode[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
</span>
|
</span>
|
||||||
<i v-if="showClear && modelValue != null" class="p-dropdown-clear-icon pi pi-times" @click="onClearClick($event)"></i>
|
<i v-if="showClear && modelValue != null" class="p-dropdown-clear-icon pi pi-times" @click="onClearClick($event)"></i>
|
||||||
<div class="p-dropdown-trigger" role="button" aria-haspopup="listbox" :aria-expanded="overlayVisible">
|
<div class="p-dropdown-trigger" role="button" aria-haspopup="listbox" :aria-expanded="overlayVisible">
|
||||||
|
<slot name="trigger">
|
||||||
<span :class="dropdownIconClass"></span>
|
<span :class="dropdownIconClass"></span>
|
||||||
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<Teleport :to="appendTarget" :disabled="appendDisabled">
|
<Teleport :to="appendTarget" :disabled="appendDisabled">
|
||||||
<transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
|
<transition name="p-connected-overlay" @enter="onOverlayEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave">
|
||||||
|
|
|
@ -438,6 +438,10 @@ export default {
|
||||||
<tr>
|
<tr>
|
||||||
<td>loader</td>
|
<td>loader</td>
|
||||||
<td>options: Options of the loader items for virtualscroller</td>
|
<td>options: Options of the loader items for virtualscroller</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>trigger</td>
|
||||||
|
<td>-</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue