laravel / nova-issues

554 stars 34 forks source link

Searchable Select doesn't close on click outside when used in an action modal #4493

Closed piljac1 closed 2 years ago

piljac1 commented 2 years ago

Description:

When you add a searchable select to an action's fields method, it doesn't close on click outside when the select is displayed.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Create an action
  2. Replicate the fields method below
    /**
    * Get the fields available on the action.
    *
    * @param  \Laravel\Nova\Http\Requests\NovaRequest  $request
    * @return \Laravel\Nova\Fields\Field[]
    */
    public function fields(NovaRequest $request)
    {
    return [
        Select::make('Site', 'site_id')
            ->options([
                1 => 'Site 1',
                2 => 'Site 2',
            ])
            ->displayUsingLabels()
            ->nullable()
            ->searchable(),
    ];
    }
  3. Add the action to a Nova resource
  4. Select the action in the resource index page (the action modal opens)
  5. Click on the searchable select (the options are then displayed)
  6. Try to close the select by clicking outside (it doesn't work)
github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.