class SegmentedState(rx.State):
options: list[str] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
control: str = "1"
options2: list[str] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"]
control2: str = "1"
...
rx.segmented_control.root(
rx.foreach(
SegmentedState.options,
lambda label: rx.segmented_control.item(label, value=label.lower()),
),
on_change=SegmentedState.setvar("control"),
value=SegmentedState.control,
),
rx.segmented_control.root(
rx.foreach(
SegmentedState.options2,
lambda label: rx.segmented_control.item(label, value=label.lower()),
),
on_change=SegmentedState.setvar("control2"),
value=SegmentedState.control2,
),
....
Describe the bug
If we exceed 10x
.item()in therx.segmented_control.root()the selected item is not highlighted anymore. In the attached screenshot, in both segmented_controls the last item is selected, but only in the first segment with <=10 items, it is visible.To Reproduce
Screenshots
Specifics (please complete the following information):