(options: T[])
| 210 | } |
| 211 | |
| 212 | export const formatNumericOptions = <T extends Option | OptionGroup>(options: T[]) => |
| 213 | options.map(option => ({ ...option, id: `value_${option.id}` })) |
| 214 | |
| 215 | // convert an option back into a number |
| 216 | export const convertNumericOption = (value: string) => Number(value.replace('value_', '')) |