Carbon: [structured list] selection variant needs peristent background for selected state

Created on 31 Jan 2020  路  5Comments  路  Source: carbon-design-system/carbon

For the selected state, the background needs to stay with the checkmark. The background color should be selected-ui.


Spec:

Screen Shot 2020-01-31 at 10 17 25 AM

structured-list react bug 馃悰

All 5 comments

Seems like this is a larger bug with the actual implementation of the React StructuredList, rather than a simple styling bug. The problem does not exist in vanilla.

Can be bundled in with any changes based on the outcome of discussion regarding larger Structured List updates

https://github.com/carbon-design-system/carbon/issues/5065

@tw15egan Just curious, is there any specific place in code where got an impression that this problem stems from how React StructuredList is implemented? Thanks!

Just a quick look at it, I'm seeing that it mainly just renders children, so the issue will be with getting the checked value back up to StructuredListRow. Can probably map over children and pass in a ref, but if there are plans to update this component then I'm not too sure how much time we wanted to spend on it right now.

Thanks @tw15egan for clarifying! I think we can listen to change event on <StructuredListRow> by letting the event bubble, but doing so causes an issue with programmatic control of the checked state. So agreed that it may involve a breaking change.

@asudoh I've been messing around with this one this afternoon, but I'm running into problems with programmatic controls like you said. Wondering if you have ideas on a possible solution to this issue, as well as https://github.com/carbon-design-system/carbon/issues/1937

Was this page helpful?
0 / 5 - 0 ratings