-
{
- e.preventDefault();
- e.stopPropagation();
- router.push(
- `/knowledge/chunks?filename=${encodeURIComponent(
- data?.filename ?? ""
- )}`
- );
- }}
- >
- {getSourceIcon(data?.connector_type)}
-
- {value}
-
-
+
{
+ router.push(
+ `/knowledge/chunks?filename=${encodeURIComponent(
+ data?.filename ?? ""
+ )}`
+ );
+ }}
+ >
+ {getSourceIcon(data?.connector_type)}
+
+ {value}
+
);
},
- cellStyle: {
- display: "flex",
- alignItems: "center",
- },
},
{
field: "size",
headerName: "Size",
- flex: 2,
- minWidth: 80,
- valueFormatter: params =>
+ valueFormatter: (params) =>
params.value ? `${Math.round(params.value / 1024)} KB` : "-",
},
{
field: "mimetype",
headerName: "Type",
- flex: 2,
- minWidth: 80,
},
{
field: "owner",
headerName: "Owner",
- flex: 2,
- minWidth: 120,
- valueFormatter: params =>
+ valueFormatter: (params) =>
params.data?.owner_name || params.data?.owner_email || "—",
},
-
{
field: "chunkCount",
headerName: "Chunks",
- flex: 2,
- minWidth: 70,
},
{
field: "avgScore",
headerName: "Avg score",
- flex: 2,
- minWidth: 90,
cellRenderer: ({ value }: CustomCellRendererProps
) => {
return (
@@ -185,17 +172,15 @@ function SearchPage() {
maxWidth: 60,
resizable: false,
sortable: false,
- flex: 0,
+ initialFlex: 0,
},
]);
const defaultColDef: ColDef = {
- cellStyle: () => ({
- display: "flex",
- alignItems: "center",
- }),
resizable: false,
suppressMovable: true,
+ initialFlex: 1,
+ minWidth: 100,
};
const onSelectionChanged = useCallback(() => {
@@ -210,7 +195,7 @@ function SearchPage() {
try {
// Delete each file individually since the API expects one filename at a time
- const deletePromises = selectedRows.map(row =>
+ const deletePromises = selectedRows.map((row) =>
deleteDocumentMutation.mutateAsync({ filename: row.filename })
);
@@ -267,7 +252,7 @@ function SearchPage() {
type="text"
defaultValue={parsedFilterData?.query}
value={queryInputText}
- onChange={e => setQueryInputText(e.target.value)}
+ onChange={(e) => setQueryInputText(e.target.value)}
placeholder="Search your documents..."
className="flex-1 bg-muted/20 rounded-lg border border-border/50 px-4 py-3 focus-visible:ring-1 focus-visible:ring-ring"
/>
@@ -312,7 +297,7 @@ function SearchPage() {
rowSelection="multiple"
rowMultiSelectWithClick={false}
suppressRowClickSelection={true}
- getRowId={params => params.data.filename}
+ getRowId={(params) => params.data.filename}
onSelectionChanged={onSelectionChanged}
suppressHorizontalScroll={false}
noRowsOverlayComponent={() => (
@@ -341,7 +326,7 @@ function SearchPage() {
}? This will remove all chunks and data associated with these documents. This action cannot be undone.
Documents to be deleted:
-${selectedRows.map(row => `• ${row.filename}`).join("\n")}`}
+${selectedRows.map((row) => `• ${row.filename}`).join("\n")}`}
confirmText="Delete All"
onConfirm={handleBulkDelete}
isLoading={deleteDocumentMutation.isPending}
diff --git a/frontend/src/components/AgGrid/agGridStyles.css b/frontend/src/components/AgGrid/agGridStyles.css
index d1d7e07d..590046c2 100644
--- a/frontend/src/components/AgGrid/agGridStyles.css
+++ b/frontend/src/components/AgGrid/agGridStyles.css
@@ -21,9 +21,6 @@ body {
border-bottom: 1px solid hsl(var(--border));
margin-bottom: 0.5rem;
}
- .ag-row {
- cursor: pointer;
- }
/* Make sure checkboxes are visible */
.ag-selection-checkbox,