diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-06-19 23:43:47 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-06-19 23:43:47 -0400 |
commit | 38de022621175bda7410df4444fcd2bbee0919cb (patch) | |
tree | fa766dd69b4fc7bb84db2f3fae92c9b7a17aa322 /src/client/views/EditableView.tsx | |
parent | 9e55bfaad39aa47ab0594c6af7f1aa68e2a8db7a (diff) |
slight tweaks.
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 70d6c22bf..0f6281b5c 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -29,6 +29,7 @@ export interface EditableProps { display?: string; oneLine?: boolean; editing?: boolean; + onClick?: (e: React.MouseEvent) => boolean; } /** @@ -65,7 +66,9 @@ export class EditableView extends React.Component<EditableProps> { @action onClick = (e: React.MouseEvent) => { - this._editing = true; + if (!this.props.onClick || !this.props.onClick(e)) { + this._editing = true; + } e.stopPropagation(); } |