diff --git a/frontend/src/components/categories/index.tsx b/frontend/src/components/categories/index.tsx
index 21ec4c33..9c29e417 100644
--- a/frontend/src/components/categories/index.tsx
+++ b/frontend/src/components/categories/index.tsx
@@ -123,7 +123,7 @@ export const Categories = () => {
actionColumns,
];
const handleSelectionChange = (selection: GridRowSelectionModel) =>
- deleteDialogCtl.saveData?.(selection as string[]);
+ deleteDialogCtl.setData?.(selection as string[]);
return (
@@ -158,7 +158,7 @@ export const Categories = () => {
) : null}
- {deleteDialogCtl?.data?.length && (
+ {deleteDialogCtl.data?.length ? (
}
@@ -169,7 +169,7 @@ export const Categories = () => {
{t("button.delete")}
- )}
+ ) : null}
diff --git a/frontend/src/components/context-vars/index.tsx b/frontend/src/components/context-vars/index.tsx
index 57932475..501552d8 100644
--- a/frontend/src/components/context-vars/index.tsx
+++ b/frontend/src/components/context-vars/index.tsx
@@ -158,7 +158,7 @@ export const ContextVars = () => {
actionColumns,
];
const handleSelectionChange = (selection: GridRowSelectionModel) =>
- deleteDialogCtl.saveData?.(selection as string[]);
+ deleteDialogCtl.setData?.(selection as string[]);
return (
@@ -193,7 +193,7 @@ export const ContextVars = () => {
) : null}
- {deleteDialogCtl?.data?.length && (
+ {deleteDialogCtl.data?.length ? (
}
@@ -204,7 +204,7 @@ export const ContextVars = () => {
{t("button.delete")}
- )}
+ ) : null}
diff --git a/frontend/src/components/nlp/components/NlpEntity.tsx b/frontend/src/components/nlp/components/NlpEntity.tsx
index a87df46f..a906dcf4 100644
--- a/frontend/src/components/nlp/components/NlpEntity.tsx
+++ b/frontend/src/components/nlp/components/NlpEntity.tsx
@@ -170,7 +170,7 @@ const NlpEntity = () => {
actionEntityColumns,
];
const handleSelectionChange = (selection: GridRowSelectionModel) =>
- deleteDialogCtl.saveData?.(selection as string[]);
+ deleteDialogCtl.setData?.(selection as string[]);
return (
@@ -202,7 +202,7 @@ const NlpEntity = () => {
) : null}
- {deleteDialogCtl?.data?.length && (
+ {deleteDialogCtl.data?.length ? (
}
@@ -213,7 +213,7 @@ const NlpEntity = () => {
{t("button.delete")}
- )}
+ ) : null}
- deleteDialogCtl.saveData?.(selection as string[]);
+ deleteDialogCtl.setData?.(selection as string[]);
const handleImportChange = async (file: File) => {
await importDataset(file);
};
@@ -396,7 +396,7 @@ export default function NlpSample() {
{t("button.export")}
) : null}
- {deleteDialogCtl.data && (
+ {deleteDialogCtl.data?.length ? (
}
@@ -407,7 +407,7 @@ export default function NlpSample() {
{t("button.delete")}
- )}
+ ) : null}
diff --git a/frontend/src/components/nlp/components/NlpValues.tsx b/frontend/src/components/nlp/components/NlpValues.tsx
index 6e0e2d1f..dad1fe8f 100644
--- a/frontend/src/components/nlp/components/NlpValues.tsx
+++ b/frontend/src/components/nlp/components/NlpValues.tsx
@@ -151,7 +151,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
const canHaveSynonyms = nlpEntity?.lookups?.[0] === NlpLookups.keywords;
const handleSelectionChange = (selection: GridRowSelectionModel) =>
- deleteDialogCtl.saveData?.(selection as string[]);
+ deleteDialogCtl.setData?.(selection as string[]);
return (
@@ -202,7 +202,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
{t("button.add")}
) : null}
- {deleteDialogCtl?.data?.length && (
+ {deleteDialogCtl.data?.length ? (
}
@@ -213,7 +213,7 @@ export const NlpValues = ({ entityId }: { entityId: string }) => {
{t("button.delete")}
- )}
+ ) : null}