From cc6e50e5d0f70fc69aeb775c8b50cab6538f6356 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Wed, 27 Nov 2024 15:19:19 +0100 Subject: [PATCH] fix: use title as id for menu --- .../visual-editor/form/inputs/triggers/PostbackInput.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx b/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx index e609afb..dd25d24 100644 --- a/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx +++ b/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx @@ -131,10 +131,10 @@ export const PostbackInput = ({ value, onChange }: PostbackInputProps) => { [block?.previousBlocks], ); const menuOptions = menu - .filter((menu) => menu.payload) - .map(({ payload, title }) => ({ - id: payload as string, - label: title as string, + .filter(({ payload }) => payload) + .map(({ title }) => ({ + id: title, + label: title, group: "menu", })); const contentOptions = useMemo(