Skip to content

Commit a3e393d

Browse files
committed
Fix objects options with component label.
1 parent 13d24ac commit a3e393d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/dash-core-components/src/utils/optionTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import React from 'react';
12
import {type} from 'ramda';
23

34
export const sanitizeOptions = options => {
45
if (type(options) === 'Object') {
56
return Object.entries(options).map(([value, label]) => ({
6-
label: String(label),
7+
label: React.isValidElement(label) ? label : String(label),
78
value,
89
}));
910
}

0 commit comments

Comments
 (0)