From 4393bd040d0cdb8fa2fb9452721f6c4c78859108 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Thu, 31 Dec 2020 18:22:58 +1100 Subject: [PATCH 1/2] Fix weird focus issue cause by #184 --- web/src/components/PartProfile/PartProfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/PartProfile/PartProfile.js b/web/src/components/PartProfile/PartProfile.js index 8a91baa..7ff2d8e 100644 --- a/web/src/components/PartProfile/PartProfile.js +++ b/web/src/components/PartProfile/PartProfile.js @@ -187,9 +187,13 @@ const PartProfile = ({ {isEditable ? 'Markdown supported' : ''}
editorRef?.current?.focusAtEnd()} + onClick={(e) => + e?.target?.id === 'description-wrap' && + editorRef?.current?.focusAtEnd() + } > Date: Thu, 31 Dec 2020 18:26:42 +1100 Subject: [PATCH 2/2] Refresh cache on mutation by fetching new data in mutation resolves #195 --- web/src/components/PartCell/PartCell.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/components/PartCell/PartCell.js b/web/src/components/PartCell/PartCell.js index 0bef362..05d736d 100644 --- a/web/src/components/PartCell/PartCell.js +++ b/web/src/components/PartCell/PartCell.js @@ -49,6 +49,13 @@ const UPDATE_PART_MUTATION = gql` updatePart: updatePart(id: $id, input: $input) { id title + description + code + mainImage + userId + Reaction { + emote + } user { id userName