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

lazily applied addCustomCSS not accepted #2079

Closed
MarcusNotheis opened this issue Aug 11, 2020 · 1 comment · Fixed by #2083
Closed

lazily applied addCustomCSS not accepted #2079

MarcusNotheis opened this issue Aug 11, 2020 · 1 comment · Fixed by #2083
Assignees

Comments

@MarcusNotheis
Copy link
Collaborator

Describe the bug
We have a scenario where we load an app extension (components) from another URL. The components from this URL are containing e.g. a ui5-select and a addCustomCSS call. Although the addCustomCSS call is executed and the style is registered in the customCSSFor map in CustomStyle.js, the styles are not applied.
I also tried to force a rerender using _invalidate() or _updateShadowRoot() on the ui5-select but it had no effect.

To reproduce
Steps to reproduce the behavior:

  1. Open the codesandbox
  2. Press apply styles and rerender
  3. Nothing happens (I would have expected that the select background is now red.
  4. Optional - if you move the addCustomCSS outside of the callback everything works as expected.

Isolated example
https://codesandbox.io/s/epic-heyrovsky-q4m0j?file=/src/index.js

Expected behavior
I would expect that custom styles are applied when components are rerendered. (Updating the affected components can be in the responsibility of the user IMO, but would be nice if the framework could do that as well).

Context

  • UI5 Web Components version: 1.0.0-rc.8
@vladitasev vladitasev self-assigned this Aug 12, 2020
@vladitasev
Copy link
Contributor

Hi @MarcusNotheis ,

We have identified the issue and are working on a fix. However, we're considering this a feature - making custom CSS dynamic.

Regards,
Vladi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants