aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-12-04 14:28:24 -0500
committerbob <bcz@cs.brown.edu>2019-12-04 14:28:24 -0500
commit710dda13398c01b2b0f63b033ccca0c8ea4f7e49 (patch)
treee7548d99883059235495aeae59e73a5250fb49b0 /src/client/views/EditableView.tsx
parent97a4a9b1cfddc8b147ff61be13624704949c97f7 (diff)
fixed mainview flyoutbehavior a bit. fixed keyvaluebox editing of lists a little.
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index f78b61892..ea9d548a1 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -10,7 +10,7 @@ export interface EditableProps {
/**
* Called to get the initial value for editing
* */
- GetValue(): string;
+ GetValue(): string | undefined;
/**
* Called to apply changes
@@ -108,8 +108,8 @@ export class EditableView extends React.Component<EditableProps> {
@action
private finalizeEdit(value: string, shiftDown: boolean) {
+ this._editing = false;
if (this.props.SetValue(value, shiftDown)) {
- this._editing = false;
this.props.isEditingCallback && this.props.isEditingCallback(false);
}
}
@@ -124,7 +124,7 @@ export class EditableView extends React.Component<EditableProps> {
}
render() {
- if (this._editing) {
+ if (this._editing && this.props.GetValue() !== undefined) {
return this.props.autosuggestProps
? <Autosuggest
{...this.props.autosuggestProps.autosuggestProps}