Skip to content
Discussion options

You must be logged in to vote

I have used a simple button with ->confirm() attribute. Inside the attribute you can insert the confirmation message.

Inside the screen commandBar() function show like this:

Button::make(__('Delete'))
                ->icon('trash')
                ->confirm(__('Are you sure?'))
                ->method('remove')

Inside a TD on table layout show like this:

TD::make(__('Actions'))
                ->cantHide()
                ->align(TD::ALIGN_CENTER)
                ->width('100px')
                ->render(function (YourModel $yourModelVariable) {
                    return DropDown::make()
                        ->icon('options-vertical')
                        ->list([

             …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tabuna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2419 on December 26, 2022 20:59.