Commits
Art Lowel authored 1dcfb729a82
25 25 | /** |
26 26 | * Whether or not the grid element is currently collapsed |
27 27 | */ |
28 28 | isCollapsed$: Observable<boolean>; |
29 29 | |
30 30 | public constructor( |
31 31 | protected truncatableService: TruncatableService, |
32 32 | protected bitstreamDataService: BitstreamDataService |
33 33 | ) { |
34 34 | super(); |
35 - | if (hasValue(this.object)) { |
36 - | this.isCollapsed$ = this.isCollapsed(); |
37 - | } |
38 35 | } |
39 36 | |
40 37 | /** |
41 38 | * Retrieve the dso from the search result |
42 39 | */ |
43 40 | ngOnInit(): void { |
44 41 | if (hasValue(this.object)) { |
45 42 | this.dso = this.object.indexableObject; |
43 + | this.isCollapsed$ = this.isCollapsed(); |
46 44 | } |
47 45 | } |
48 46 | |
49 47 | /** |
50 48 | * Gets all matching metadata string values from hitHighlights or dso metadata, preferring hitHighlights. |
51 49 | * |
52 50 | * @param {string|string[]} keyOrKeys The metadata key(s) in scope. Wildcards are supported; see [[Metadata]]. |
53 51 | * @returns {string[]} the matching string values or an empty array. |
54 52 | */ |
55 53 | allMetadataValues(keyOrKeys: string | string[]): string[] { |