Is there a way to prevent the occurrence of the "no nested ternary" error in TypeScript?
disablePortal
options={
// eslint-disable-next-line no-nested-ternary
units=== "mm"
? valuesMm
: units === "km"
? valueskm
: valuesls
}
I attempted to use this code but encountered an error.
options={
units=== "mm"
? valuesMm
: [
units.slumpUnit === "cm"
? valuesCm
: valuesIn,
]
}