New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cds-checkbox-group layout 'hroizontanl-inline' showing items vertically when there are more items to display instead of wrapping #149
Comments
@colinreedmiller Is this intentional? The cds-layout switches to vertical when the checkboxes would wrap - I think this might be the responsive behavior? In fact, storybook has this exact use case as the first demo: https://storybook.core.clarity.design/?path=/story/forms-responsive--page |
This is a specific case where we don't want to use the multi-select because of usability reasons. We are migrating from |
Like Colin said, that's not the behavior of the component, nor do we intend to enable that behavior - it's not good design or UX to have that many checkboxes that they need to wrap. Let me see if I can find a work around for you. |
Ok, Core has the idea of a generic "control" - basically you can put whatever you want inside of an element with the If you want this behavior, you can create your own checkbox group essentially. I have a demo, you may need to play with some of the padding around the checkboxes to more closely match the checkbox group's layout. You will also lose some behavior of the checkbox group - like setting the status or disabled attributes on the group element will not propagate to the children. https://stackblitz.com/edit/clarity-javascript-demo-n8dtpy?file=src%2Findex.js,src%2Findex.html Please not that the cds-control element has |
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary. |
Describe the bug
When using
cds-checkbox-group
with morecds-checkbox
elements that don't fit in the width, items are displayed with vertical layout.How to reproduce
The following link shows the behavior with less number of elements and higher number.
https://stackblitz.com/edit/clarity-javascript-demo-rqcq7q?file=src%2Findex.js,src%2Findex.html
Expected behavior
When there are more elements it should wrap to the next line instead of a vertical alignment
Versions
Clarity project:
Clarity version:
Framework:
Device:
The text was updated successfully, but these errors were encountered: