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

[Toolbar]: Toolbar Component in DynamicPageTitle - numberOfAlwaysVisibleItems Not Working Correctly #5912

Closed
1 task done
bomasap opened this issue Jun 11, 2024 · 3 comments

Comments

@bomasap
Copy link

bomasap commented Jun 11, 2024

Describe the bug

When the toolbar component is used within the DynamicPageTitle and the numberOfAlwaysVisibleItems property is set to 2, all buttons are moved to the overflow popover when the page width is less than 1680px.

Isolated Example

https://stackblitz.com/edit/github-t5j5mn-o5nlfq?file=src%2FApp.tsx

Reproduction steps

  1. Use the toolbar component within the DynamicPageTitle.
  2. Set the numberOfAlwaysVisibleItems property to 2.
  3. Resize the page width to be less than 1680px.
  4. Observe that all buttons are displayed in the overflow popover.

Expected Behaviour

The expected behavior is that there should always be 2 visible buttons.

Screenshots or Videos

Screenshot 2024-06-11 at 10 53 14 AM Screenshot 2024-06-11 at 10 53 23 AM

UI5 Web Components for React Version

1.28.4

UI5 Web Components Version

1.24.0

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Relevant log output

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@Lukas742
Copy link
Contributor

Hi @bomasap

only "actions" (preferably buttons) should be passed to the actions prop. If you want to customize the internal Toolbar, you can use the actionsToolbarProps prop. Here you can find an example applying numberOfAlwaysVisibleItems: https://stackblitz.com/edit/github-t5j5mn-kurjmr?file=src%2FApp.tsx

@bomasap
Copy link
Author

bomasap commented Jun 12, 2024

Hi @Lukas742
If put a component into "actions" dynamicPageTile, the actionsToolbarProps is not working, and the the gap is missing between buttons(this defect is mentioned in #5873)

https://stackblitz.com/edit/github-t5j5mn-sqkfkc?file=src%2FActions.tsx,src%2FApp.tsx

@Lukas742
Copy link
Contributor

This has the same reason as outlined here.

custom components that render multiple elements are currently not supported as actions of the DynamicPageTitle. You can find out more about this here.

@Lukas742 Lukas742 removed the bug label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants