diff --git a/jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx b/jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx index ac75ef4de..9a186e493 100644 --- a/jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx +++ b/jbrowse/src/client/JBrowse/VariantSearch/components/VariantTableWidget.tsx @@ -2,7 +2,7 @@ import { observer } from 'mobx-react'; import { DataGrid, GridColDef, - GridColumnVisibilityModel, + GridColumnVisibilityModel, GridFilterPanel, GridPaginationModel, GridRenderCellParams, GridSortDirection, @@ -420,13 +420,26 @@ const VariantTableWidget = observer(props => { } } + // NOTE: the filterPanel/sx override is added to fix an issue where the grid column filter value input doesn't align with the field and operator inputs const gridElement = ( { } const gridElement = ( + // NOTE: the filterPanel/sx override is added to fix an issue where the grid column filter value input doesn't align with the field and operator inputs rawFeatureToRow(rawFeature, id, gridColumns, trackId))} - slots={{ toolbar: GridToolbar }} + slots={{ toolbar: GridToolbar, filterPanel: GridFilterPanel }} + slotProps={{ + filterPanel: { + filterFormProps: { + valueInputProps: { + sx: { + marginTop: 0 + } + } + } + } + }} pageSizeOptions={[10,25,50,100]} paginationModel={ pageSizeModel } onPaginationModelChange= {(newModel) => setPageSizeModel(newModel)}