+ {/* biome-ignore lint/a11y/noStaticElementInteractions: modal content wrapper */}
+
e.stopPropagation()}
+ onKeyDown={(e) => e.stopPropagation()}
+ >
+
+
+
+
+
+ Filter Documents
+
+
+
+ Select documents to restrict searches. When active, only selected
+ documents will be searched.
+
+
setSearchTerm(e.target.value)}
+ />
+
+ {loading ? (
+
Loading documents...
+ ) : filteredDocuments.length === 0 ? (
+
+ {searchTerm ? "No matching documents" : "No documents found"}
+
+ ) : (
+ filteredDocuments.map((doc) => {
+ const displayName = getDisplayName(doc);
+ return (
+
+ );
+ })
+ )}
+
+
+
+ {localSelected.size > 0 ? (
+ <>
+ {localSelected.size} document
+ {localSelected.size === 1 ? "" : "s"} selected
+
+ >
+ ) : (
+ "No filter (all documents)"
+ )}
+
+
+
+
+
+
+