[Bug]: FluidDropdownSkeleton
className
is being added to wrong element
#15442
Labels
FluidDropdownSkeleton
className
is being added to wrong element
#15442
Package
@carbon/react
Browser
Chrome
Package version
v1.46.1
React version
v18.2.0
Description
I'm using
FluidDropdown
in aFluidForm
, and it's in aflex
layout where I'd like it to grow equally with its peers to fill the available width in the row. This is working well, because I can apply styles via aclassName
to theFluidDropdown
and it gets put on the top-level DOM element of the dropdown i.e. the one that also hascds--dropdown__wrapper cds--list-box__wrapper cds--list-box__wrapper--fluid
.While the data for the dropdown is loading I'm using a
FluidDropdownSkeleton
but this is failing to grow equally with its peers because the styles are not applied to the right place, but to a child element.For demonstration here's the moment where one dropdown has loaded but not the other. Note that
big-input
is applied at the top level to the top one (FluidDropdown
), but applied at the second level of the bottom one (FluidDropdownSkeleton
):Reproduction/example
https://stackblitz.com/edit/github-tymoau?file=src%2FApp.jsx
Steps to reproduce
FluidDropdownSkeleton
.FluidDropdownSkeleton
viaclassName
to influence its position in its parent, such asflex-grow
orflex-basis
.FluidDropdownSkeleton
does not lay out as expected because the styles are not applied at the top level of theFluidDropdownSkeleton
.Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: