Skip to content

Commit

Permalink
Allow emptying targetUrl in ExternalLinkBlock (v6) (#2475)
Browse files Browse the repository at this point in the history
Backport of #2474
  • Loading branch information
thomasdax98 authored Aug 26, 2024
1 parent b55aeb7 commit 60b06d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-games-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": patch
---

Allow emptying `targetUrl` in `ExternalLinkBlock`
2 changes: 1 addition & 1 deletion packages/admin/cms-admin/src/blocks/ExternalLinkBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const ExternalLinkBlock: BlockInterface<ExternalLinkBlockData, State, Ext
<SelectPreviewComponent>
<BlocksFinalForm
onSubmit={(newState) => {
updateState((prevState) => ({ ...prevState, ...newState }));
updateState(newState);
}}
initialValues={state}
>
Expand Down

0 comments on commit 60b06d4

Please sign in to comment.