diff options
author | mehekj <mehek.jethani@gmail.com> | 2022-10-12 13:21:07 -0400 |
---|---|---|
committer | mehekj <mehek.jethani@gmail.com> | 2022-10-12 13:21:07 -0400 |
commit | 0b3a83acd4f75b7f6ff4b9bb7daf4377dede51a1 (patch) | |
tree | 438789f7e7f50e5eb9829e1f301b4d043d8d4906 /src/client/views/collections/collectionLinear/CollectionLinearView.tsx | |
parent | 69ca9baca6ff1da272a5191187542351bd242ccc (diff) | |
parent | eb5f75785fd28acb50f1b30434e89223fff00185 (diff) |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/collections/collectionLinear/CollectionLinearView.tsx')
-rw-r--r-- | src/client/views/collections/collectionLinear/CollectionLinearView.tsx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx index 0d7d67dd8..92f6bbb64 100644 --- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx +++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx @@ -198,13 +198,7 @@ export class CollectionLinearView extends CollectionSubView() { <div className={`collectionLinearView-outer ${this.layoutDoc.linearViewSubMenu}`} style={{ backgroundColor: BoolCast(this.layoutDoc.linearViewIsExpanded) ? undefined : 'transparent' }}> <div className="collectionLinearView" ref={this.createDashEventsTarget} onContextMenu={this.myContextMenu}> {!expandable ? null : ( - <Tooltip - title={ - <> - <div className="dash-tooltip">{BoolCast(this.props.Document.linearViewIsExpanded) ? 'Close' : 'Open'}</div> - </> - } - placement="top"> + <Tooltip title={<div className="dash-tooltip">{BoolCast(this.props.Document.linearViewIsExpanded) ? 'Close' : 'Open'}</div>} placement="top"> {menuOpener} </Tooltip> )} @@ -213,7 +207,17 @@ export class CollectionLinearView extends CollectionSubView() { type="checkbox" checked={BoolCast(this.props.Document.linearViewIsExpanded)} ref={this.addMenuToggle} - onChange={action(() => (this.props.Document.linearViewIsExpanded = this.addMenuToggle.current!.checked))} + onChange={action(e => { + ScriptCast(this.Document.onClick)?.script.run({ + this: this.layoutDoc, + self: this.rootDoc, + _readOnly_: false, + scriptContext: this.props.scriptContext, + thisContainer: this.props.ContainingCollectionDoc, + documentView: this.props.docViewPath().lastElement(), + }); + this.props.Document.linearViewIsExpanded = this.addMenuToggle.current!.checked; + })} /> <div |