From ae8fb15be00b332491b91477cae8c7109fa7d57e Mon Sep 17 00:00:00 2001 From: Cannon Lock Date: Thu, 21 Dec 2023 12:39:37 -0600 Subject: [PATCH] Update long-text cells on source update --- src/pages/maps/@id/edit/components/cell/long-text.ts | 4 ++++ src/pages/maps/@id/edit/override.sass | 1 + 2 files changed, 5 insertions(+) diff --git a/src/pages/maps/@id/edit/components/cell/long-text.ts b/src/pages/maps/@id/edit/components/cell/long-text.ts index 150e738a..eda81971 100644 --- a/src/pages/maps/@id/edit/components/cell/long-text.ts +++ b/src/pages/maps/@id/edit/components/cell/long-text.ts @@ -18,6 +18,10 @@ const LongTextCell = ({value, onConfirm, intent, ...props} : EditableCell2Props) const [localValue, setLocalValue] = React.useState(value == null ? "" : value.toString()); + useEffect(() => { + setLocalValue(value == null ? "" : value.toString()) + }, [value]) + return h(Cell, { ...props, style: {...props.style, padding: 0}, diff --git a/src/pages/maps/@id/edit/override.sass b/src/pages/maps/@id/edit/override.sass index 6c3c1ad9..007d5ade 100644 --- a/src/pages/maps/@id/edit/override.sass +++ b/src/pages/maps/@id/edit/override.sass @@ -3,6 +3,7 @@ .bp4-button-text overflow: hidden text-overflow: ellipsis + min-height: 1rem // Need this to get the popups in front of the sidebar