From 399f9cc3e05db438393e40eadeae8ce2c4bd5648 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 26 Apr 2024 01:34:32 -0600 Subject: [PATCH 1/3] feat: include id from props not config --- apps/react/app/re-used-space/App.tsx | 2 +- packages/react/src/components/Space.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/react/app/re-used-space/App.tsx b/apps/react/app/re-used-space/App.tsx index 70189e57..a481ea33 100644 --- a/apps/react/app/re-used-space/App.tsx +++ b/apps/react/app/re-used-space/App.tsx @@ -93,8 +93,8 @@ const App = () => { { - const { config, children } = props + const { config, id, children } = props const { updateSpace } = useContext(FlatfileContext) const callback = useCallback(() => { - updateSpace(config) + updateSpace({ + ...(config || {}), + id, + }) }, [config, updateSpace]) useDeepCompareEffect(callback, [config]) From 98a907bbf877a5b3f9f6620bf9bbac07659ea396 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 26 Apr 2024 01:35:23 -0600 Subject: [PATCH 2/3] chore: changeset --- .changeset/funny-shirts-argue.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/funny-shirts-argue.md diff --git a/.changeset/funny-shirts-argue.md b/.changeset/funny-shirts-argue.md new file mode 100644 index 00000000..8ab26efe --- /dev/null +++ b/.changeset/funny-shirts-argue.md @@ -0,0 +1,5 @@ +--- +'@flatfile/react': patch +--- + +Fixes bug with re-using spaces' From 5a2e447089f4c06bde4ea2493adc911f53b7c142 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 26 Apr 2024 10:43:51 -0600 Subject: [PATCH 3/3] Update .changeset/funny-shirts-argue.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .changeset/funny-shirts-argue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/funny-shirts-argue.md b/.changeset/funny-shirts-argue.md index 8ab26efe..10635082 100644 --- a/.changeset/funny-shirts-argue.md +++ b/.changeset/funny-shirts-argue.md @@ -2,4 +2,4 @@ '@flatfile/react': patch --- -Fixes bug with re-using spaces' +Fixes bug with re-using spaces.