#1459 for other selects

pull/1533/head
Cagatay Civici 2021-08-27 16:58:51 +03:00
parent 2670b1e539
commit 5b0532aeca
16 changed files with 41 additions and 8 deletions

View File

@ -156,6 +156,10 @@ const CascadeSelectSlots = [
{ {
name: "option", name: "option",
description: "Custom content for the item's option" description: "Custom content for the item's option"
},
{
name: "indicator",
description: "Custom content for the dropdown indicator"
} }
]; ];

View File

@ -285,8 +285,8 @@ const DividerSlots = [
description: "Custom content for the virtual scroller loader items" description: "Custom content for the virtual scroller loader items"
}, },
{ {
name: "trigger", name: "indicator",
description: "Custom content for the component's trigger" description: "Custom content for the dropdown indicator"
} }
]; ];

View File

@ -294,6 +294,10 @@ const MultiSelectSlots = [
{ {
name: "loader", name: "loader",
description: "Custom content for the virtual scroller loader items" description: "Custom content for the virtual scroller loader items"
},
{
name: "indicator",
description: "Custom content for the dropdown indicator"
} }
]; ];

View File

@ -175,6 +175,10 @@ const TreeSelectSlots = [
{ {
name: "empty", name: "empty",
description: "Custom content when there is no data to display" description: "Custom content when there is no data to display"
},
{
name: "indicator",
description: "Custom content for the dropdown indicator"
} }
]; ];

View File

@ -31,6 +31,7 @@ declare class CascadeSelect {
$slot: { $slot: {
option: VNode[]; option: VNode[];
value: VNode[]; value: VNode[];
indicator: VNode[];
} }
} }

View File

@ -10,7 +10,9 @@
</slot> </slot>
</span> </span>
<div class="p-cascadeselect-trigger" role="button" aria-haspopup="listbox" :aria-expanded="overlayVisible"> <div class="p-cascadeselect-trigger" role="button" aria-haspopup="listbox" :aria-expanded="overlayVisible">
<slot name="indicator">
<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">

View File

@ -53,7 +53,7 @@ declare class Dropdown {
empty: VNode[]; empty: VNode[];
content: VNode[]; content: VNode[];
loader: VNode[]; loader: VNode[];
trigger: VNode[]; indicator: VNode[];
} }
} }

View File

@ -11,7 +11,7 @@
</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"> <slot name="indicator">
<span :class="dropdownIconClass"></span> <span :class="dropdownIconClass"></span>
</slot> </slot>
</div> </div>

View File

@ -57,6 +57,7 @@ declare class MultiSelect {
chip: VNode[]; chip: VNode[];
content: VNode[]; content: VNode[];
loader: VNode[]; loader: VNode[];
indicator: VNode[];
} }
} }

View File

@ -23,7 +23,9 @@
</div> </div>
</div> </div>
<div class="p-multiselect-trigger"> <div class="p-multiselect-trigger">
<slot name="indicator">
<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">

View File

@ -34,6 +34,7 @@ declare class TreeSelect {
header: VNode[]; header: VNode[];
footer: VNode[]; footer: VNode[];
empty: VNode[]; empty: VNode[];
indicator: VNode[];
} }
} }

View File

@ -20,7 +20,9 @@
</div> </div>
</div> </div>
<div class="p-treeselect-trigger"> <div class="p-treeselect-trigger">
<slot name="indicator">
<span class="p-treeselect-trigger-icon pi pi-chevron-down"></span> <span class="p-treeselect-trigger-icon pi pi-chevron-down"></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">

View File

@ -301,6 +301,10 @@ data() {
<tr> <tr>
<td>option</td> <td>option</td>
<td>option: Option instance</td> <td>option: Option instance</td>
</tr>
<tr>
<td>indicator</td>
<td>-</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -440,7 +440,7 @@ export default {
<td>options: Options of the loader items for virtualscroller</td> <td>options: Options of the loader items for virtualscroller</td>
</tr> </tr>
<tr> <tr>
<td>trigger</td> <td>indicator</td>
<td>-</td> <td>-</td>
</tr> </tr>
</tbody> </tbody>

View File

@ -465,6 +465,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>indicator</td>
<td>-</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -447,6 +447,10 @@ data() {
<tr> <tr>
<td>empty</td> <td>empty</td>
<td>-</td> <td>-</td>
</tr>
<tr>
<td>indicator</td>
<td>-</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>