diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-09-29 15:56:04 -0400 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-09-29 15:56:04 -0400 |
commit | d9389cf288829bc8dd8c26a91693b1cfc4edacfb (patch) | |
tree | 6c4e0e353bd2bbfe14ee7fb382ea9e29a5fcaafa /src/client/views/StyleProvider.tsx | |
parent | ef2a1037a418ad9fa35d6c60feba914d828d5b84 (diff) | |
parent | e9c9476ad3958b89843057dc4287ced180ee04c4 (diff) |
Merge branch 'alyssa-starter' of https://github.com/brown-dash/Dash-Web into alyssa-starter
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index 262f888fb..16f6aa40b 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -19,12 +19,11 @@ import { SnappingManager } from '../util/SnappingManager'; import { undoable, UndoManager } from '../util/UndoManager'; import { TreeSort } from './collections/TreeSort'; import { Colors } from './global/globalEnums'; -import { TagsView } from './TagsView'; -import { CollectionFreeFormDocumentView } from './nodes/CollectionFreeFormDocumentView'; import { DocumentView, DocumentViewProps } from './nodes/DocumentView'; import { FieldViewProps } from './nodes/FieldView'; import { StyleProp } from './StyleProp'; import './StyleProvider.scss'; +import { TagsView } from './TagsView'; function toggleLockedPosition(doc: Doc) { UndoManager.RunInBatch(() => Doc.toggleLockedPosition(doc), 'toggleBackground'); @@ -319,13 +318,12 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps & : childFilters?.().filter(f => ClientUtils.IsRecursiveFilter(f) && f !== ClientUtils.noDragDocsFilter).length || childFiltersByRanges?.().length ? 'orange' // 'inheritsFilter' : undefined; - return !showFilterIcon ? null : ( + return !showFilterIcon || props?.hideFilterStatus ? null : ( <div className="styleProvider-filter"> <Dropdown type={Type.TERT} dropdownType={DropdownType.CLICK} fillWidth - // eslint-disable-next-line react/no-unstable-nested-components iconProvider={() => <div className='styleProvider-filterShift'><FaFilter/></div>} closeOnSelect setSelectedVal={((dvValue: unknown) => { @@ -365,7 +363,8 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps & </Tooltip> ); }; - const tags = () => props?.DocumentView?.() ? <TagsView Views={[props.DocumentView()]}/> : null; + const tags = () => docView?.() ? <TagsView Views={[docView?.()]}/> : null; + return ( <> {paint()} |