Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update confirm button for row delete confirmation modal

Joshen Limda5f9b945ff1
diff --git a/studio/components/grid/components/header/Header.tsx b/studio/components/grid/components/header/Header.tsx
index 2dff24d48c4..bd046838806 100644
--- a/studio/components/grid/components/header/Header.tsx
+++ b/studio/components/grid/components/header/Header.tsx
@@ -114,7 +114,8 @@ const RowHeader: FC<RowHeaderProps> = ({ sorts, filters }) => {
const onRowsDelete = () => {
confirmAlert({
title: 'Confirm to delete',
- message: 'Are you sure you want to delete the selected rows? This action cannot be undone.',
+ message: `Are you sure you want to delete the selected ${selectedRows.size} rows? This action cannot be undone.`,
+ confirmText: `Delete ${selectedRows.size} rows`,
onAsyncConfirm: async () => {
if (allRowsSelected) {
const { error } =
diff --git a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js b/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
index 0b3ea97dcf8..26e1caf6c1c 100644
--- a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
+++ b/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModal.js
@@ -8,6 +8,7 @@ function ConfirmModal({
onConfirm,
onAsyncConfirm,
variant = 'danger',
+ confirmText = 'Confirm',
}) {
const [loading, setLoading] = useState(false)
@@ -46,7 +47,7 @@ function ConfirmModal({
Cancel
</Button>
<Button type="primary" onClick={() => onConfirmClick()} loading={loading}>
- Confirm
+ {confirmText}
</Button>
</div>
}