projects
/
arvados-workbench2.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ee5873
)
19930: Check if richtext project description contains text to omit saving empty html...
author
Stephen Smith <stephen@curii.com>
Mon, 27 Feb 2023 17:12:23 +0000
(12:12 -0500)
committer
Stephen Smith <stephen@curii.com>
Mon, 27 Feb 2023 17:12:23 +0000
(12:12 -0500)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
src/components/text-field/text-field.tsx
patch
|
blob
|
history
diff --git
a/src/components/text-field/text-field.tsx
b/src/components/text-field/text-field.tsx
index 78e2c7fbedc3f5ac64ecd5aab9328e7532a77e16..b2a8dd4848602a24eb66fba407f545d0cf992c35 100644
(file)
--- a/
src/components/text-field/text-field.tsx
+++ b/
src/components/text-field/text-field.tsx
@@
-72,7
+72,11
@@
export const RichEditorTextField = withStyles(styles)(
onChange = (value: any) => {
this.setState({ value });
- this.props.input.onChange(value.toString('html'));
+ this.props.input.onChange(
+ !!value.getEditorState().getCurrentContent().getPlainText().trim()
+ ? value.toString('html')
+ : null
+ );
}
render() {