fix: use title as id for menu

This commit is contained in:
yassinedorbozgithub 2024-11-27 15:19:19 +01:00
parent 28dc3e0e4f
commit cc6e50e5d0

View File

@ -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(