Is there a way to customize a dropdown option in Fluent UI with two columns?
The issue I'm facing is that I need single-digit numbers to align properly with 2-digit or 3-digit numbers:
Link to see the problem visually
I believe having two columns and using "flex-end" for number alignment in the first column, while keeping text aligned normally in the second, could be a potential solution. Any thoughts on this approach?
This is the code snippet I use to map the dropdown options:
let mainGroupOptions = Object.keys(dropDownOptions)
.map(key => {
return { key, text: dropDownOptions[key].value + " - " + dropDownOptions[key].label, value: dropDownOptions[key].value };
});
Below is the HTML code for the Dropdown component:
<Dropdown
label="Main Group*"
options={mainGroupOptions}
selectedKey={mainGroupSelected}
errorMessage={errors.mainGroup ? "Main group required" : ''}
onChange={(e, option) => { setMainGroupSelected(option.key); deleteErrors(errors, errors.mainGroup) }}>
</Dropdown>