I have a situation where I want to display an option in an <AutocompleteInput> as disabled, so that I can let the user know that it exists but does not meet the requirements. For this purpose, it works well enough to simply disable the option and use helperText to explain why it cannot be selected.
<ReferenceInput source='sender.id' reference='staff'>
<AutocompleteInput<StaffList>
label='resources.message.fields.sender'
helperText='resources.message.helperText.sender'
getOptionDisabled={(record) => !record.email}
/>
</ReferenceInput>
That getOptionDisabled seems to work, but I couldn't find any mention of it in the documentation. Has this been left out of the documentation, or is it not supposed to be used this way?
I have a situation where I want to display an option in an
<AutocompleteInput>as disabled, so that I can let the user know that it exists but does not meet the requirements. For this purpose, it works well enough to simply disable the option and usehelperTextto explain why it cannot be selected.That
getOptionDisabledseems to work, but I couldn't find any mention of it in the documentation. Has this been left out of the documentation, or is it not supposed to be used this way?