Skip to content

Problems with using Segmented Buttons inside a Panel #4467

@qscheitlin

Description

@qscheitlin

Hello Everyone,

I posted this in the Discussions page, because I thought potentially I might be doing something wrong. But the more I think about it and try to develop workarounds, I actually think it might be a bug with the Toolbar.

--

Within an ObjectPageSection, I have a Panel that contains a Toolbar comprising a SegmentedButton. However, I can't seem to get the SegmentedButtonItem to have a width that fully fits the text. Does anyone know how to solve this? I should also mention moving the SegmentedButton code outside of the Toolbar results in the SegmentedButtonItems having a right width.

image

Example Code is provided below:

<Panel fixed={true}>
              <Toolbar>
                  <SegmentedButton>
                    <SegmentedButtonItem>
                      All ({count.All})
                    </SegmentedButtonItem>
                    <SegmentedButtonItem>
                      Mini-Vans ({count.A})
                    </SegmentedButtonItem>
                    <SegmentedButtonItem>
                      Sedans ({count.B})
                    </SegmentedButtonItem>
                    <SegmentedButtonItem>
                      Automotives ({count.C})
                    </SegmentedButtonItem>
                 </SegmentedButton>
                 <ToolbarSpacer></ToolbarSpacer>
                 <Button icon="add" design="Emphasized">Add Car</Button>
           </Toolbar>
  </Panel>

Originally posted by @qscheitlin in #4452

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions