checkboxGroup cannot check all after custom label data
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
I need to add some tag elements to the label,But when I use the following function,checkall invalid。
getPlainOptions(){
const { list }=this.props
const newLists = list.map(item=> {
const newList = {...item};
newList.label = <span className={styles.checklist}><img src={item.avatar} /><span>{item.name}</span></span>;
newList.value = item.userid;
return newList;
})
return newLists
}
<Checkbox
indeterminate={this.state.indeterminate}
onChange={this.onCheckAllChange}
checked={this.state.checkAll}
>Check All</Checkbox>
<CheckboxGroup className={styles.checkGroup} options={this.plainOptions} value={this.state.checkedList} onChange={this.onChange} />
What does the proposed API look like?
I hope this is effective.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Need to save which checkboxes will be shown as options
I have these checkboxes on a page and on another page I have these same checkboxes. <div data-role="content" data-theme="a"> ...
Read more >How to ungroup Checkboxes - ServiceNow Community
If there is no custom label, check boxes are grouped under an Options label by the application. In a group of check box...
Read more >How To Create a Custom Checkbox - W3Schools
Learn how to create custom checkboxes and radio buttons with CSS. ... <input type="checkbox" checked="checked"> ... .container .checkmark:after { left: 9px;
Read more >ARIA: checkbox role - Accessibility - MDN Web Docs - Mozilla
Since a checkbox is an interactive control, it must be focusable and keyboard accessible. If the role is applied to a non-focusable element,...
Read more >Checkbox - Ant Design
Checkbox component. ... Basic usage of checkbox. expand code. TypeScript ... The indeterminate property can help you to achieve a 'check all' effect....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My own temporary solution is to expand the array, `onCheckAllChange = (e) => {
}`;
This issue is closed because it has been marked as
Need Reproduce
, but has not had recent activity. If you can provide a reproduce, feel free to ping anyone of our maintainers to reopen this issue. Thank you for your contributions.