Open
Description
a movie gallery (still)
What is your problem ?
The button component creates a clickable button that triggers an action. This action can be destructive, such as deleting or altering a record.
It would be beneficial to have a confirmation dialog appear when the button is clicked. If the user clicks "Confirm," the action will be performed; otherwise, the confirmation dialog will close, and the user will remain on the current page.
This feature would help prevent accidental deletions.
What are you currently doing ?
Living in fear :)
Describe the solution you'd like
Have additional optional properties for the component:
- "confirm" a bolean ; enable confirm dialog when set to true ; default to false (for backward compatibility)
- "confirm_text" a text ; message displayed in the confirmation dialog; defaults to "are you sure you want to proceed ?"
select
'button' as component
;
select
'/delete_item.sql?id=' || id as link
, 'trash' as icon
, 'danger' as color
, 'Delete' as title
, true as confirm
, 'You are about to delete item "' || title || '". please confirm' as confirm_text
;
Describe alternatives you've considered
None