Skip to content

Commit

Permalink
Review Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 21, 2024
1 parent c3c2de4 commit b838662
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/dataviews/src/filter-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default function FilterSummary( {
openedFilter,
...commonProps
}: FilterSummaryProps ) {
const toggleRef = useRef< HTMLDivElement | null >( null );
const toggleRef = useRef< HTMLDivElement >( null );
const { filter, view, onChangeView } = commonProps;
const filterInView = view.filters.find( ( f ) => f.field === filter.field );
const activeElements = filter.elements.filter( ( element ) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Filters = memo( function Filters< Item extends AnyItem >( {
openedFilter,
setOpenedFilter,
}: FiltersProps< Item > ) {
const addFilterRef = useRef< HTMLButtonElement | null >( null );
const addFilterRef = useRef< HTMLButtonElement >( null );
const filters: NormalizedFilter[] = [];
fields.forEach( ( field ) => {
if ( ! field.elements?.length ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/search-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function normalizeSearchInput( input = '' ) {
return removeAccents( input.trim().toLowerCase() );
}

const EMPTY_ARRAY = [] as [];
const EMPTY_ARRAY: [] = [];
const getCurrentValue = (
filterDefinition: NormalizedFilter,
currentFilter?: Filter
Expand Down

0 comments on commit b838662

Please sign in to comment.