-
Notifications
You must be signed in to change notification settings - Fork 271
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
ToolbarButton: The ToolbarButton has no "hidden" property #10585
Comments
Hi @jannislmml you can pass all HTMLAttributes to almost all of our components, including |
Hi @Lukas742 I have updated from version 1 to 2 and a lot has changed in the ObjectPage. Among other things, the toolbar with its toolbar buttons has now been added here. I only want to display some buttons in a certain situation. To do this, I have entered the condition in the hidden property. However, this has no effect. The disabled property works correctly. Thank you! Here is the corresponding part in my code: |
@jannislmml the example includes references to variables and functions that are not defined within the example. Without these, it's impossible to run or test the code. Please create an isolated, reproducible example, preferably by leveraging the StackBlitz template. |
Hi @jannislmml this is probably because the In React it's typical for such cases to conditional render elements. This way the DOM is not populated with elements that aren't displayed: https://stackblitz.com/edit/github-e98ms9jk-ux9r6kbn?file=src%2FApp.tsx I'm going to forward this issue to the ui5-webcomponents repo, as the Hi Colleagues, |
Hello @ui5-webcomponents-topic-p I am forwarding this issue to you, because the hidden attribute does not work as expected on ui5-toolbar-button (it is taken into consideration at first, but upon change - it is not being correctly updated). Same works with ui5-button, ui5-label etc out of the box. However, it seems with ui5-toolbar-button there is a problem with the internally created button, which is not being updated. Most probably due to missing description of the hidden property as part of the reactive state of the ToolbarButton component.
|
Describe the bug
Why does the ToolbarButton has no hidden property?
Isolated Example
No response
Reproduction steps
...
Expected Behaviour
No response
Screenshots or Videos
No response
UI5 Web Components for React Version
2.6.0
UI5 Web Components Version
2.6.2
Browser
Chrome
Operating System
Windows 11
Additional Context
No response
Relevant log output
Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: