Trying to initialise Choices on element already initialised

I'm getting the error Trying to initialise Choices on element already initialised on a select I have. It seems to be related to radio buttons I have at the top of the page that allow the user to select which tasks to view. When selecting "my tasks" or another users tasks, there is no error, but if I have a users tasks selected, and then I click the "all tasks" radio option, It must be trying to re-render the edit modal that's associated with each task, and also where the select is located that the error is referencing. Hopefully I'm making sense. Everything still works, but I'd like to get rid of the error.
public function editTaskForm(Form $form): Form
{
return $form->schema([
TextInput::make('title')->required(),
Textarea::make('description')->autosize(),
Select::make('assigned_to')
->options(fn (): array => $this->task->team->members->pluck('fullName', 'id')->toArray())
->searchable()
])
->model($this->task)
->statePath('taskData');
}
public function editTaskForm(Form $form): Form
{
return $form->schema([
TextInput::make('title')->required(),
Textarea::make('description')->autosize(),
Select::make('assigned_to')
->options(fn (): array => $this->task->team->members->pluck('fullName', 'id')->toArray())
->searchable()
])
->model($this->task)
->statePath('taskData');
}
No description
0 Replies
No replies yetBe the first to reply to this messageJoin