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

Show tree search if paging is not necessary #656

Merged

Conversation

BlackbitDevs
Copy link
Contributor

If you set

pimcore:
  objects:
    tree_paging_limit: 1000

and an element has less than 1000 children, the paging toolbar does not get displayed. The downside is that also the search does not get displayed then.

This PR changes this: Even if all items fit on the current page, there is still the search shown:
Bildschirmfoto 2024-08-13 um 08 13 55

The behaviour if tree_paging_limit < total number of children does not get changed.

@fashxp
Copy link
Member

fashxp commented Aug 13, 2024

so search is now shown all the time for every folder?

@BlackbitDevs
Copy link
Contributor Author

Yes. Of course we can also add a threshold so that the search only gets shown if there are more than X items.

@mattamon
Copy link
Contributor

Yes. Of course we can also add a threshold so that the search only gets shown if there are more than X items.

I think a threshold would be nice yes. Could use the default limit again like 30?

@BlackbitDevs
Copy link
Contributor Author

Have added threshold: only if parent element has >= 30 child items, the search does get shown.

@mattamon mattamon added this to the 1.6.0 milestone Sep 2, 2024
@mattamon
Copy link
Contributor

mattamon commented Sep 2, 2024

Have added threshold: only if parent element has >= 30 child items, the search does get shown.

Perfect thank you!
Since this is going to be in the 1.6 version could you also add the changes to the CHANGELOG.md so it is documented?
That would be awesome!

@BlackbitDevs
Copy link
Contributor Author

Added changelog.

Copy link

sonarcloud bot commented Sep 2, 2024

Copy link
Contributor

@mattamon mattamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you for your effort!

@fashxp WDYT? The 30 element search limit was added.

@mattamon mattamon self-assigned this Sep 3, 2024
@mattamon mattamon merged commit e3c2e43 into pimcore:1.x Sep 3, 2024
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants