material-react-table 0.29.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.29.0",
2
+ "version": "0.29.1",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -225,7 +225,7 @@ export type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit<
225
225
  enableEditing?: boolean;
226
226
  filterFn?: MRT_FilterFn<TData>;
227
227
  filterSelectOptions?: (string | { text: string; value: string })[];
228
- filterVariant?: 'text' | 'select' | 'multiSelect' | 'range';
228
+ filterVariant?: 'text' | 'select' | 'multi-select' | 'range';
229
229
  /**
230
230
  * footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
231
231
  */
@@ -131,7 +131,7 @@ export const getDefaultColumnFilterFn = <
131
131
  >(
132
132
  columnDef: MRT_ColumnDef<TData>,
133
133
  ): MRT_FilterOption => {
134
- if (columnDef.filterVariant === 'multiSelect') return 'arrIncludesSome';
134
+ if (columnDef.filterVariant === 'multi-select') return 'arrIncludesSome';
135
135
  if (columnDef.filterVariant === 'select') return 'equals';
136
136
  if (columnDef.filterVariant === 'range') return 'betweenInclusive';
137
137
  return 'fuzzy';
@@ -74,8 +74,10 @@ export const MRT_FilterTextField: FC<Props> = ({
74
74
  const isRangeFilter =
75
75
  columnDef.filterVariant === 'range' || rangeFilterIndex !== undefined;
76
76
  const isSelectFilter = columnDef.filterVariant === 'select';
77
- const isMultiSelectFilter = columnDef.filterVariant === 'multiSelect';
78
- const isTextboxFilter = !isSelectFilter && !isMultiSelectFilter;
77
+ const isMultiSelectFilter = columnDef.filterVariant === 'multi-select';
78
+ const isTextboxFilter =
79
+ columnDef.filterVariant === 'text' ||
80
+ (!isSelectFilter && !isMultiSelectFilter);
79
81
 
80
82
  const currentFilterOption = currentFilterFns?.[header.id];
81
83
  const filterId = `mrt-${tableId}-${header.id}-filter-text-field${