Problem
The following pattern appears in multiple places:
selected={selected || (multiple !== true && undefined)}
focus={cursor === i || undefined}
This is hard to read, causes TypeScript warnings, and introduces TODO/FIXME comments.
Expected Behavior
Clear, type-safe logic
No TODO/FIXME comments
No runtime change
Actual Behavior
Boolean logic mixes || and &&
TypeScript infers boolean | undefined
Requires inline comments to justify behavior
Proposed Fix
Replace with explicit ternary expressions:
selected={selected ? true : undefined}
focus={cursor === i ? true : undefined}
Why This Is Safe
Runtime behavior is identical
Improves readability
Removes TypeScript ambiguity
Scope
Options.tsx
OptionsPaginated.tsx