Skip to content

Commit e80a65f

Browse files
committed
Open AnnotationPanel for bare item search results (#455)
1 parent 94fb8f9 commit e80a65f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

frontend/src/explorer/explorer-event-controller.ts

+4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ class ExplorerEventController {
125125
const flat = collection.get(annotation.id);
126126
flat.trigger('focus', flat);
127127
});
128+
} else {
129+
const itemPanel = new AnnotationView({ model: result });
130+
this.explorerView.popUntil(searchResults).push(itemPanel);
131+
return itemPanel;
128132
}
129133
}
130134

frontend/src/panel-search-results/search-result-base-view.ts

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default class SearchResultView extends CompositeView<FlatItem> {
4040
if (!model.has('annotation')) {
4141
ctor = SearchResultItemView
4242
this.$el.removeClass('search-result box');
43+
this.undelegate('click');
4344
}
4445
this.contentView = new ctor({ model }).render();
4546
this.render().activateContent();

0 commit comments

Comments
 (0)