Skip to content

Build your personal knowledge base with Trilium Notes

fix(search): bound the height of full-height views in search results (#11787)

Elian Doran1d14da974bfd
diff --git a/apps/client/src/widgets/collections/calendar/index.css b/apps/client/src/widgets/collections/calendar/index.css
index 78332ccf73..23fdb524fd 100644
--- a/apps/client/src/widgets/collections/calendar/index.css
+++ b/apps/client/src/widgets/collections/calendar/index.css
@@ -19,14 +19,6 @@
}
}
-.search-result-widget-content .calendar-view {
- position: absolute;
- top: 0;
- inset-inline-start: 0;
- inset-inline-end: 0;
- bottom: 0;
-}
-
.calendar-container {
height: 100%;
}
diff --git a/apps/client/src/widgets/collections/table/index.css b/apps/client/src/widgets/collections/table/index.css
index 7d26573a22..c7dde57829 100644
--- a/apps/client/src/widgets/collections/table/index.css
+++ b/apps/client/src/widgets/collections/table/index.css
@@ -15,14 +15,6 @@
height: 100%;
}
-.search-result-widget-content .table-view {
- position: absolute;
- top: 0;
- inset-inline-start: 0;
- inset-inline-end: 0;
- bottom: 0;
-}
-
.tabulator-cell .autocomplete {
position: absolute;
top: 50%;
diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css
index 8888bd01ac..59a0be81da 100644
--- a/apps/client/src/widgets/search_result.css
+++ b/apps/client/src/widgets/search_result.css
@@ -12,3 +12,17 @@
display: flex;
flex-direction: column;
}
+
+/* A full-height view (table, board, calendar…) needs a bounded height: Tabulator, for one, renders
+ every row at once when its container grows with its content. */
+.search-result-widget:has(> .note-list-widget.full-height) {
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+
+ > .note-list-widget.full-height {
+ flex-grow: 1;
+ min-height: 0;
+ overflow: hidden;
+ }
+}