biotope-element icon indicating copy to clipboard operation
biotope-element copied to clipboard

Props passed via attribute on to child components disappear after render

Open no-creative-name opened this issue 5 years ago • 0 comments

Describe the bug I try to add a component B into component A inside its template and pass a prop from component A to component B. The prop then is available inside component B's script, but after component B is rendered, the attribute is not set on the component tag anymore. Thus, any attribute-based styling won't work.

To Reproduce Steps to reproduce the behavior:

  1. See description

Expected behavior Props passed on as attributes from one component to another stay on the child's HTML tag.

Additional context Can be temporarily fixed by re-setting the attribute inside of the rendered hook of the child.

no-creative-name avatar Feb 13 '20 09:02 no-creative-name