dillingham / nova-button

Add buttons on Nova index, detail and lens views.
MIT License
265 stars 33 forks source link

Programmatically disable button state #92

Open atmediauk opened 3 years ago

atmediauk commented 3 years ago

Hello,

Is it possible to disable button state programmatically as it looks out of place for some types of buttons.

The normal behaviour in Nova for an edit resource button or a link button is to simply load the page. With the nova-button plugin it will first show a loading/ success message and then load the page which makes the UI feel disjointed.

Is there a way to optionally disable this? For example:

Button::make('Text')->link('https://nova.laravel.com', '_self')->disableState();

or

Button::make('Text')->edit('App\Nova\User', $this->user_id)->disableState();