We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13d24ac commit a3e393dCopy full SHA for a3e393d
components/dash-core-components/src/utils/optionTypes.js
@@ -1,9 +1,10 @@
1
+import React from 'react';
2
import {type} from 'ramda';
3
4
export const sanitizeOptions = options => {
5
if (type(options) === 'Object') {
6
return Object.entries(options).map(([value, label]) => ({
- label: String(label),
7
+ label: React.isValidElement(label) ? label : String(label),
8
value,
9
}));
10
}
0 commit comments