|
Download wp-calypso/client/components/bulk-select/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 711 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/bulk-select/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/bulk-select/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/bulk-select/README.md
711 Bytes
Bulk Select
This component is used to implement a checkbox which you can use to bulk select a list of elements
How to use
import BulkSelect from 'calypso/components/bulk-select';
function render() {
return <BulkSelect selectedElements={ 3 } totalElements={ 6 } onToggle={ callback } />;
}
Props
selectedElements: (number) The number of elements currently selectedtotalElements: (number) The number of all the elements that can be selectedonToggle: (function) callback to be executed when the checkbox state is change. The callback receives a boolean indicating the state of the 'select all' checkbox, and normally you would want to apply it to the list of elements here.