Add Listbox header and remove from OrderList/PickList

pull/5507/head
tugcekucukoglu 2024-03-26 13:31:15 +03:00
parent fc947d61fa
commit bb51b40051
7 changed files with 6 additions and 25 deletions

View File

@ -11,7 +11,9 @@
:data-p-hidden-accessible="true"
:data-p-hidden-focusable="true"
></span>
<slot name="header" :value="modelValue" :options="visibleOptions"></slot>
<div :class="cx('header')">
<slot name="header" :value="modelValue" :options="visibleOptions"></slot>
</div>
<div v-if="filter" :class="cx('header')" v-bind="ptm('header')">
<div :class="cx('filterContainer')" v-bind="ptm('filterContainer')">
<InputText

View File

@ -133,10 +133,6 @@ export interface OrderListPassThroughOptions {
* Used to pass attributes to the container's DOM element.
*/
container?: OrderListPassThroughOptionType;
/**
* Used to pass attributes to the header's DOM element.
*/
header?: OrderListPassThroughOptionType;
/**
* Used to pass attributes to the Listbox component.
* @see {@link ListboxPassThroughOptions}

View File

@ -55,9 +55,7 @@
@change="onChangeSelection"
>
<template v-if="$slots.header" #header>
<div :class="cx('header')" v-bind="ptm('header')">
<slot name="header"></slot>
</div>
<slot name="header"></slot>
</template>
<template #option="{ option, index }">
<slot name="item" :item="option" :index="index" />

View File

@ -4,7 +4,6 @@ const classes = {
root: 'p-orderlist p-component',
controls: 'p-orderlist-controls',
container: 'p-orderlist-list-container',
header: 'p-orderlist-header',
list: 'p-orderlist-list',
item: 'p-orderlist-item'
};

View File

@ -172,10 +172,6 @@ export interface PickListPassThroughOptions {
* Used to pass attributes to the source wrapper's DOM element.
*/
sourceWrapper?: PickListPassThroughOptionType;
/**
* Used to pass attributes to the source header's DOM element.
*/
sourceHeader?: PickListPassThroughOptionType;
/**
* Used to pass attributes to the source list's DOM element.
*/
@ -204,10 +200,6 @@ export interface PickListPassThroughOptions {
* Used to pass attributes to the target wrapper's DOM element.
*/
targetWrapper?: PickListPassThroughOptionType;
/**
* Used to pass attributes to the target header's DOM element.
*/
targetHeader?: PickListPassThroughOptionType;
/**
* Used to pass attributes to the target list's DOM element.
*/

View File

@ -56,9 +56,7 @@
data-pc-group-section="list"
>
<template v-if="$slots.sourceheader" #header>
<div :class="cx('sourceHeader')" v-bind="ptm('sourceHeader')" data-pc-group-section="header">
<slot name="sourceheader"></slot>
</div>
<slot name="sourceheader"></slot>
</template>
<template #option="{ option, index }">
<slot name="item" :item="option" :index="index" />
@ -121,9 +119,7 @@
data-pc-group-section="list"
>
<template v-if="$slots.targetheader" #header>
<div :class="cx('targetheader')" v-bind="ptm('targetheader')" data-pc-group-section="header">
<slot name="targetheader"></slot>
</div>
<slot name="targetheader"></slot>
</template>
<template #option="{ option, index }">
<slot name="item" :item="option" :index="index" />

View File

@ -4,11 +4,9 @@ const classes = {
root: 'p-picklist p-component',
sourceControls: 'p-picklist-buttons p-picklist-source-controls',
sourceWrapper: 'p-picklist-list-wrapper p-picklist-source-wrapper',
sourceHeader: 'p-picklist-header',
sourceList: 'p-picklist-list p-picklist-source-list',
buttons: 'p-picklist-buttons p-picklist-transfer-buttons',
targetWrapper: 'p-picklist-list-wrapper p-picklist-target-wrapper',
targetHeader: 'p-picklist-header',
targetList: 'p-picklist-list p-picklist-target',
item: 'p-picklist-item',
targetControls: 'p-picklist-buttons p-picklist-target-controls'