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], [block?.previousBlocks],
); );
const menuOptions = menu const menuOptions = menu
.filter((menu) => menu.payload) .filter(({ payload }) => payload)
.map(({ payload, title }) => ({ .map(({ title }) => ({
id: payload as string, id: title,
label: title as string, label: title,
group: "menu", group: "menu",
})); }));
const contentOptions = useMemo( const contentOptions = useMemo(