Skip to content
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

Open
lukasvdelft opened this issue Dec 21, 2024 · 4 comments
Open

Tree: filter input prevents style changes in slot default #6983

lukasvdelft opened this issue Dec 21, 2024 · 4 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback

Comments

@lukasvdelft
Copy link

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.

@lukasvdelft lukasvdelft added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 21, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 26, 2024
Copy link

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.

@lukasvdelft
Copy link
Author

i added a test case https://primevue4viteissuetemplate-zypu--5173--c8c182a3.local-credentialless.webcontainer.io
i am new to this test case thing. not sure if it is saved.

to replicate the issue.
1 expand root
2 click on the icon for "leaf 1", it will change
3 type "leaf" in the filter
4 click on the icon for "leaf 1", it will NOT change

@lukasvdelft
Copy link
Author

In case the link is not working.
primevue-4-vite-issue-template-cvdeecmq.zip
I only changed the app.vue file.

@cagataycivici cagataycivici changed the title Tee: filter input prevents style changes in slot default Tree: filter input prevents style changes in slot default Dec 27, 2024
@cagataycivici cagataycivici added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Dec 27, 2024
Copy link

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! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
None yet
Development

No branches or pull requests

3 participants