Refactor on DataViewLayoutOptions

pull/5507/head
tugcekucukoglu 2024-03-25 09:35:20 +03:00
parent e879d1d2c8
commit 90aecf226e
2 changed files with 6 additions and 1 deletions

View File

@ -60,6 +60,11 @@ export interface DataViewLayoutOptionsPassThroughOptions {
* @see {@link SelectButtonPassThroughOptions}
*/
root?: SelectButtonPassThroughOptions<DataViewLayoutOptionsSharedPassThroughMethodOptions>;
/**
* Used to pass attributes to the root's DOM element.
* @see {@link SelectButtonPassThroughOptions}
*/
selectbutton?: SelectButtonPassThroughOptions<DataViewLayoutOptionsSharedPassThroughMethodOptions>;
/**
* Used to pass attributes to the list icon's DOM element.
*/

View File

@ -1,5 +1,5 @@
<template>
<SelectButton :class="cx('root')" :modelValue="modelValue" :options="options" :allowEmpty="false" :unstyled="unstyled" :pt="ptm('selectbutton')" @update:modelValue="changeLayout">
<SelectButton :class="cx('root')" :modelValue="modelValue" :options="options" :allowEmpty="false" :unstyled="unstyled" :pt="{ ...ptm('selectbutton'), ...ptm('root') }" @update:modelValue="changeLayout">
<template #option="{ option }">
<slot v-if="option === 'list'" name="listicon">
<BarsIcon v-bind="ptm('listIcon')" />