-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree: filter input prevents style changes in slot default #6983
Comments
We're unable to replicate your issue, if you are able to create a reproducer by using PrimeVue Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days. |
i added a test case https://primevue4viteissuetemplate-zypu--5173--c8c182a3.local-credentialless.webcontainer.io to replicate the issue. |
In case the link is not working. |
Due to PrimeTek's demanding roadmap for PrimeVue and the limited bandwidth of the core team, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨ |
Describe the bug
I have a Tree with filter enabled. The tree holds a slot default config with 3 v-if's which contain a button with a different icon which respond to state node.visible changes. Clicking the button changes the node.visible state and the icon changes. When an entry is typed in the filter box the v-if's are not responding anymore. I don't know if this is intended behaviour, hence the bug report.
Reproducer
__
PrimeVue version
4.2.4
Vue version
4.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
chrome 131
Steps to reproduce the behavior
Add a slot default to a tree with a filter enabled. Type an entry and the v-ifs (depending on node.visible) don't get processed anymore (the actual response to the button clicks keep working normal).
<Tree
:value = 'root'
selection-mode = 'single'
v-model:selectionKeys = selectedKeys
v-model:expandedKeys = expandedKeys
@nodeSelect = 'onNodeSelect'
@nodeUnselect = 'onNodeUnselect'
@node-expand = 'onNodeExpand'
loading-mode = 'icon'
:filter = 'true'
filterMode = 'strict'
>
<Button v-if='node.visible == true'
style = 'position:absolute; left:-5px; margin-top: -7px;'
icon = 'pi pi-eye'
outlined
size='small'
@click.stop='setVisibility(node as TreeNodeExtended)'
/>
<Button v-if='node.visible == false'
style = 'position:absolute; left:-5px; margin-top: -7px;'
icon = 'pi pi-eye-slash'
outlined
size='small'
@click.stop='setVisibility(node as TreeNodeExtended)'
/>
<Button v-if='node.visible == undefined'
style = 'position:absolute; left:-5px; margin-top: -7px;'
icon = 'pi pi-circle-off'
outlined
size='small'
@click.stop='setVisibility(node as TreeNodeExtended)'
/>
{{ node.label }}
Expected behavior
The v-if's within slot default keep responding to input even the filter is activated.
The text was updated successfully, but these errors were encountered: