Edit select form throwing error if not exists
If the select contains a value which does not exist in the relationship option then it throws
Filament\Forms\Components\Select::getEditOptionActionFormData(): Return value must be of type array, null returnedHow to hide the form an show empty select. Tried this but still throws the error. If there are invalid data in the database e.g test_id=123 and this does not exist in the database, then the error is thrown when using the edit form
4 Replies
Why is the relationship empty?
Updated it for clarity it was just to show that it happens when there's a relationship.
Don´t you need to specify what field? Like
->relationship('relation_name', 'column_name')
I don't understand how a relationship could be empty. Literally by definition, the options in a relationship Select exist.