From 1e2e9feb78d9ea8c061c0141a5fd44ecb9f7fe1a Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Thu, 13 May 2021 01:34:35 -0400 Subject: filter icon shows up for all collections --- .../collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 ------ src/client/views/nodes/DocumentView.tsx | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 9bc764aca..0f9dbe23b 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1495,12 +1495,6 @@ export class CollectionFreeFormView extends CollectionSubView} - {StrListCast(this.props.Document._docFilters).length || StrListCast(this.props.Document._docRangeFilters).length || StrListCast(CurrentUserUtils.ActiveDashboard._docFilters).length || StrListCast(CurrentUserUtils.ActiveDashboard._docRangeFilters).length ? - { runInAction(() => CurrentUserUtils.propertiesWidth = 250); e.stopPropagation(); }} - /> - : (null)}
{ !this.props.dontRegisterView && DocumentManager.Instance.RemoveView(this); } + @computed get showFilterIcon() { + return this.props.Document.type === DocumentType.COL && !Doc.IsSystem(this.props.Document) && (StrListCast(this.props.Document._docFilters).length || StrListCast(this.props.Document._docRangeFilters).length || StrListCast(CurrentUserUtils.ActiveDashboard._docFilters).length || StrListCast(CurrentUserUtils.ActiveDashboard._docRangeFilters).length); + } render() { TraceMobx(); const xshift = () => (this.props.Document.isInkMask ? InkingStroke.MaskDim : Math.abs(this.Xshift) <= 0.001 ? this.props.PanelWidth() : undefined); @@ -1164,6 +1167,11 @@ export class DocumentView extends React.Component { focus={this.props.focus || emptyFunction} bringToFront={emptyFunction} ref={action((r: DocumentViewInternal | null) => this.docView = r)} /> + {this.showFilterIcon ? + + : (null)}
)} ); } -- cgit v1.2.3-70-g09d2