Skip to content

Commit

Permalink
Fix objects options with component label.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Jul 4, 2022
1 parent 13d24ac commit a3e393d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/dash-core-components/src/utils/optionTypes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import {type} from 'ramda';

export const sanitizeOptions = options => {
if (type(options) === 'Object') {
return Object.entries(options).map(([value, label]) => ({
label: String(label),
label: React.isValidElement(label) ? label : String(label),
value,
}));
}
Expand Down

0 comments on commit a3e393d

Please sign in to comment.