diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-09-19 00:11:23 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-09-19 00:11:23 -0400 |
| commit | be5456616a7813572b9fdc9637d4009e7283a46a (patch) | |
| tree | 0d77a72a8ca136f999a7746ff31811dc88053955 /src/client/views/search | |
| parent | 25ea85f7cf2c7f6109eb740ffc111325a39fb745 (diff) | |
added ContainingCollectionDoc to props that get passed around.
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/FilterBox.tsx | 6 | ||||
| -rw-r--r-- | src/client/views/search/SearchItem.tsx | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/search/FilterBox.tsx b/src/client/views/search/FilterBox.tsx index c13d1d276..da733d64b 100644 --- a/src/client/views/search/FilterBox.tsx +++ b/src/client/views/search/FilterBox.tsx @@ -195,11 +195,9 @@ export class FilterBox extends React.Component { collections.push(element.props.Document); } } - //gets the selected doc's containing view - let containingView = element.props.ContainingCollectionView; //makes sure collections aren't added more than once - if (containingView && !collections.includes(containingView.props.Document)) { - collections.push(containingView.props.Document); + if (element.props.ContainingCollectionDoc && !collections.includes(element.props.ContainingCollectionDoc)) { + collections.push(element.props.ContainingCollectionDoc); } }); diff --git a/src/client/views/search/SearchItem.tsx b/src/client/views/search/SearchItem.tsx index 510672788..b2e886d95 100644 --- a/src/client/views/search/SearchItem.tsx +++ b/src/client/views/search/SearchItem.tsx @@ -180,6 +180,7 @@ export class SearchItem extends React.Component<SearchItemProps> { zoomToScale={emptyFunction} getScale={returnOne} ContainingCollectionView={undefined} + ContainingCollectionDoc={undefined} ContentScaling={scale} /> </div>; |
