From e695fb64d317ecb47b6844dc2a185502244f7db1 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Fri, 10 Jan 2025 14:47:19 +0100 Subject: [PATCH] fix(widget): set-options from widget components should be partial (#1882) --- apps/nextjs/src/components/board/items/item-content.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/nextjs/src/components/board/items/item-content.tsx b/apps/nextjs/src/components/board/items/item-content.tsx index b8aff4fb2..db9323c66 100644 --- a/apps/nextjs/src/components/board/items/item-content.tsx +++ b/apps/nextjs/src/components/board/items/item-content.tsx @@ -88,7 +88,14 @@ const InnerContent = ({ item, ...dimensions }: InnerContentProps) => { isEditMode={isEditMode} boardId={board.id} itemId={item.id} - setOptions={updateOptions} + setOptions={(partialNewOptions) => + updateOptions({ + newOptions: { + ...partialNewOptions.newOptions, + ...options, + }, + }) + } {...dimensions} />