Closed oscarcornejo closed 4 years ago
Hello, that is not supported. You have a couple options to get the labels from the selected values passed in the onChange
function:
simpleValue={false}
and then map your selected options to labels:// When <CheckboxTree simpleValue={false} />
const labels = this.state.selected.map(option => option.label);
// When using default properties
// Construct value/label mapping
const labelMap = {};
options.forEach((option) => {
labelMap[option.value] = option.label;
});
// Convert selected values to labels
const labels = this.state.selected.map(value => labelMap[value]);
Closing due to lack of activity. Please reopen if you still have issues.
Hi, any option to get the label content and not the value with the selected property? I need to insert the value I get in a textarea input with the data that happened to the second column, but by doing this I only get the value content:
I would appreciate the help. Regards!