Closed aeberts closed 2 years ago
Hi @aeberts, Did you manage to resolve this issue? I have the exact same problem.
Hi @nakiya, I think the workaround would be to put the flex-box settings in the :style
parameter or add a custom :class
and style it from your css file. It's not as elegant as having a :size
parameter in the input-text
but I believe it would work (disclaimer: I haven't tried it yet myself).
Unfortunately yes, in re-com, children take their own styling like flex, align e.t.c. If not provided, sometimes they get assigned to some calculated component defaults. For example in input-text
, I think what you are seeing is the flex defaulting to none
as seen here.
This will be resolved by #284. Closing.
My apologies if this is a misunderstanding of flexbox or how re-com works.
Note: The snippets below comes from: https://github.com/aeberts/redoo/blob/728015f4ea2622a669d753e6a8d4835d6a33685c/src/cljs/redoo/views.cljs#L22)
The input-text component doesn't seem to respect the flex settings of it's parent container:
Expected:
rc/input-text
inherits the flex settings ofrc/box
(i.e.:size "auto"
)Actual:
rc/input-text
has a flex setting of:0 0 auto