From 3eab3ba4b52dc8c96327c155b5283af1f98fb562 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 4 Jan 2024 15:33:35 +0100 Subject: [PATCH] Fix issue on filter reference select --- .../src/widgets/forms/NWFSelectReferencedFilters.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/virtweb_frontend/src/widgets/forms/NWFSelectReferencedFilters.tsx b/virtweb_frontend/src/widgets/forms/NWFSelectReferencedFilters.tsx index 12c9722..e035393 100644 --- a/virtweb_frontend/src/widgets/forms/NWFSelectReferencedFilters.tsx +++ b/virtweb_frontend/src/widgets/forms/NWFSelectReferencedFilters.tsx @@ -29,10 +29,14 @@ export function NWFSelectReferencedFilters(p: { { - p.selected.splice(n, 1); - p.onChange?.(); - }} + onDelete={ + p.editable + ? () => { + p.selected.splice(n, 1); + p.onChange?.(); + } + : undefined + } /> ))}