FrontPastel/node_modules/@mui/base/modern/useSelect/defaultOptionStringifier.js

16 lines
305 B
JavaScript
Raw Normal View History

2024-04-17 13:55:11 +00:00
const defaultOptionStringifier = option => {
const {
label,
value
} = option;
if (typeof label === 'string') {
return label;
}
if (typeof value === 'string') {
return value;
}
// Fallback string representation
return String(option);
};
export { defaultOptionStringifier };