Fixed #6581 - Tree filter too close, visual bug

pull/6596/head
Cagatay Civici 2024-10-16 09:54:52 +03:00
parent a68215083e
commit 52bb19aa80
7 changed files with 18 additions and 2 deletions

View File

@ -8,7 +8,7 @@
</slot> </slot>
</div> </div>
</template> </template>
<IconField v-if="filter" :unstyled="unstyled" :pt="ptm('pcFilterContainer')"> <IconField v-if="filter" :unstyled="unstyled" :pt="ptm('pcFilter')" :class="cx('pcFilter')">
<InputText v-model="filterValue" autocomplete="off" :class="cx('pcFilterInput')" :placeholder="filterPlaceholder" :unstyled="unstyled" @keydown="onFilterKeydown" :pt="ptm('pcFilterInput')" /> <InputText v-model="filterValue" autocomplete="off" :class="cx('pcFilterInput')" :placeholder="filterPlaceholder" :unstyled="unstyled" @keydown="onFilterKeydown" :pt="ptm('pcFilterInput')" />
<InputIcon :unstyled="unstyled" :pt="ptm('pcFilterIconContainer')"> <InputIcon :unstyled="unstyled" :pt="ptm('pcFilterIconContainer')">
<!--TODO: searchicon deprecated since v4.0--> <!--TODO: searchicon deprecated since v4.0-->

View File

@ -116,6 +116,10 @@ const theme = ({ dt }) => `
color: ${dt('tree.node.icon.selected.color')}; color: ${dt('tree.node.icon.selected.color')};
} }
.p-tree-filter {
margin: ${dt('tree.filter.margin')};
}
.p-tree-filter-input { .p-tree-filter-input {
width: 100%; width: 100%;
} }
@ -162,6 +166,7 @@ const classes = {
], ],
mask: 'p-tree-mask p-overlay-mask', mask: 'p-tree-mask p-overlay-mask',
loadingIcon: 'p-tree-loading-icon', loadingIcon: 'p-tree-loading-icon',
pcFilter: 'p-tree-filter',
pcFilterInput: 'p-tree-filter-input', pcFilterInput: 'p-tree-filter-input',
wrapper: 'p-tree-root', //TODO: discuss wrapper: 'p-tree-root', //TODO: discuss
rootChildren: 'p-tree-root-children', rootChildren: 'p-tree-root-children',

View File

@ -107,7 +107,6 @@ const theme = ({ dt }) => `
overflow: hidden; overflow: hidden;
} }
.p-treeselect-tree-container { .p-treeselect-tree-container {
overflow: auto; overflow: auto;
} }

View File

@ -47,5 +47,8 @@ export default {
}, },
loadingIcon: { loadingIcon: {
size: '2rem' size: '2rem'
},
filter: {
margin: '0 0 0.5rem 0'
} }
}; };

View File

@ -47,5 +47,8 @@ export default {
}, },
loadingIcon: { loadingIcon: {
size: '2rem' size: '2rem'
},
filter: {
margin: '0 0 0.5rem 0'
} }
}; };

View File

@ -48,6 +48,9 @@ export default {
loadingIcon: { loadingIcon: {
size: '2rem' size: '2rem'
}, },
filter: {
margin: '0 0 0.75rem 0'
},
css: ({ dt }) => ` css: ({ dt }) => `
.p-tree-node-content { .p-tree-node-content {
transition: none; transition: none;

View File

@ -47,5 +47,8 @@ export default {
}, },
loadingIcon: { loadingIcon: {
size: '2rem' size: '2rem'
},
filter: {
margin: '0 0 0.5rem 0'
} }
}; };