mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
change default text filters to contain from fuzzy and number filters to range
This commit is contained in:
@@ -19,6 +19,7 @@ export const referenceTableColumns: MRT_ColumnDef<Reference>[] = [
|
||||
Cell,
|
||||
header: 'Author',
|
||||
maxSize: 60,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'date_primary',
|
||||
|
||||
@@ -17,36 +17,48 @@ export const CrossSearchTable = ({ selectorFn }: { selectorFn?: (newObject: Cros
|
||||
accessorKey: 'loc_name',
|
||||
header: 'Locality name',
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'country',
|
||||
header: 'Country',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'state',
|
||||
id: 'state',
|
||||
accessorFn: (row) => row.state || 'N/A',
|
||||
header: 'State',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'county',
|
||||
id: 'county',
|
||||
accessorFn: (row) => row.county || 'N/A',
|
||||
header: 'County',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bfa_max',
|
||||
id: 'bfa_max',
|
||||
accessorFn: (row) => row.bfa_max || 'N/A',
|
||||
header: 'BFA max',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bfa_min',
|
||||
id: 'bfa_min',
|
||||
accessorFn: (row) => row.bfa_min || 'N/A',
|
||||
header: 'BFA min',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'max_age',
|
||||
header: 'Max age',
|
||||
filterVariant: 'range',
|
||||
Cell: ({ cell }) => (cell.getValue() as number).toFixed(3),
|
||||
},
|
||||
{
|
||||
accessorKey: 'min_age',
|
||||
header: 'Min age',
|
||||
filterVariant: 'range',
|
||||
Cell: ({ cell }) => (cell.getValue() as number).toFixed(3),
|
||||
},
|
||||
{
|
||||
accessorKey: 'frac_max',
|
||||
@@ -57,16 +69,22 @@ export const CrossSearchTable = ({ selectorFn }: { selectorFn?: (newObject: Cros
|
||||
header: 'Frac min',
|
||||
},
|
||||
{
|
||||
accessorKey: 'chron',
|
||||
id: 'chron',
|
||||
accessorFn: (row) => row.chron || 'N/A',
|
||||
header: 'Chron',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'basin',
|
||||
id: 'basin',
|
||||
accessorFn: (row) => row.basin || 'N/A',
|
||||
header: 'Basin',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'subbasin',
|
||||
id: 'subbasin',
|
||||
accessorFn: (row) => row.subbasin || 'N/A',
|
||||
header: 'Subbasin',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'dms_lat',
|
||||
@@ -99,16 +117,22 @@ export const CrossSearchTable = ({ selectorFn }: { selectorFn?: (newObject: Cros
|
||||
header: 'Gen locality',
|
||||
},
|
||||
{
|
||||
accessorKey: 'plate',
|
||||
id: 'plate',
|
||||
accessorFn: (row) => row.plate || 'N/A',
|
||||
header: 'Plate',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'formation',
|
||||
id: 'formation',
|
||||
accessorFn: (row) => row.formation || 'N/A',
|
||||
header: 'Formation',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'member',
|
||||
id: 'member',
|
||||
accessorFn: (row) => row.member || 'N/A',
|
||||
header: 'Member',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bed',
|
||||
@@ -116,70 +140,90 @@ export const CrossSearchTable = ({ selectorFn }: { selectorFn?: (newObject: Cros
|
||||
},
|
||||
{
|
||||
accessorKey: 'species_id',
|
||||
header: 'Species Id',
|
||||
header: 'Id',
|
||||
size: 20,
|
||||
},
|
||||
{
|
||||
accessorKey: 'subclass_or_superorder_name',
|
||||
id: 'subclass_or_superorder_name',
|
||||
accessorFn: (row) => row.subclass_or_superorder_name || 'N/A',
|
||||
header: 'Subclass or Superorder',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'order_name',
|
||||
header: 'Order',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'suborder_or_superfamily_name',
|
||||
id: 'suborder_or_superfamily_name',
|
||||
accessorFn: (row) => row.suborder_or_superfamily_name || 'N/A',
|
||||
header: 'Suborder or Superfamily',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'family_name',
|
||||
id: 'family_name',
|
||||
accessorFn: (row) => row.family_name || 'N/A',
|
||||
header: 'Family',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'subfamily_name',
|
||||
id: 'subfamily_name',
|
||||
accessorFn: (row) => row.subfamily_name || 'N/A',
|
||||
header: 'Subfamily or Tribe',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'genus_name',
|
||||
header: 'Genus',
|
||||
size: 20,
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'species_name',
|
||||
header: 'Species',
|
||||
size: 20,
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'unique_identifier',
|
||||
header: 'Unique Identifier',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'taxonomic_status',
|
||||
id: 'taxonomic_status',
|
||||
accessorFn: (row) => row.taxonomic_status || 'N/A',
|
||||
header: 'Taxonomic Status',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'common_name',
|
||||
id: 'common_name',
|
||||
accessorFn: (row) => row.common_name || 'N/A',
|
||||
header: 'Common Name',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'sp_author',
|
||||
id: 'sp_author',
|
||||
accessorFn: (row) => row.sp_author || 'N/A',
|
||||
header: 'Author',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'strain',
|
||||
id: 'strain',
|
||||
accessorFn: (row) => row.strain || 'N/A',
|
||||
header: 'Strain',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'gene',
|
||||
@@ -187,14 +231,18 @@ export const CrossSearchTable = ({ selectorFn }: { selectorFn?: (newObject: Cros
|
||||
size: 20,
|
||||
},
|
||||
{
|
||||
accessorKey: 'body_mass',
|
||||
id: 'body_mass',
|
||||
accessorFn: (row) => row.body_mass || 'N/A',
|
||||
header: 'Body Mass',
|
||||
size: 20,
|
||||
filterVariant: 'range',
|
||||
},
|
||||
{
|
||||
accessorKey: 'brain_mass',
|
||||
id: 'brain_mass',
|
||||
accessorFn: (row) => row.brain_mass || 'N/A',
|
||||
header: 'Brain Mass',
|
||||
size: 20,
|
||||
filterVariant: 'range',
|
||||
},
|
||||
],
|
||||
[]
|
||||
|
||||
@@ -13,33 +13,43 @@ export const LocalityTable = ({ selectorFn }: { selectorFn?: (newObject: Localit
|
||||
() => [
|
||||
{
|
||||
accessorKey: 'lid',
|
||||
header: 'Id',
|
||||
header: 'Locality Id',
|
||||
size: 20,
|
||||
},
|
||||
{
|
||||
accessorKey: 'loc_name',
|
||||
header: 'Name',
|
||||
header: 'Locality name',
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'country',
|
||||
header: 'Country',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'state',
|
||||
id: 'state',
|
||||
accessorFn: (row) => row.state || 'N/A',
|
||||
header: 'State',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'county',
|
||||
id: 'county',
|
||||
accessorFn: (row) => row.county || 'N/A',
|
||||
header: 'County',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bfa_max',
|
||||
id: 'bfa_max',
|
||||
accessorFn: (row) => row.bfa_max || 'N/A',
|
||||
header: 'BFA max',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bfa_min',
|
||||
id: 'bfa_min',
|
||||
accessorFn: (row) => row.bfa_min || 'N/A',
|
||||
header: 'BFA min',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'max_age',
|
||||
@@ -62,16 +72,22 @@ export const LocalityTable = ({ selectorFn }: { selectorFn?: (newObject: Localit
|
||||
header: 'Frac min',
|
||||
},
|
||||
{
|
||||
accessorKey: 'chron',
|
||||
id: 'chron',
|
||||
accessorFn: (row) => row.chron || 'N/A',
|
||||
header: 'Chron',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'basin',
|
||||
id: 'basin',
|
||||
accessorFn: (row) => row.basin || 'N/A',
|
||||
header: 'Basin',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'subbasin',
|
||||
id: 'subbasin',
|
||||
accessorFn: (row) => row.subbasin || 'N/A',
|
||||
header: 'Subbasin',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'dms_lat',
|
||||
@@ -104,16 +120,22 @@ export const LocalityTable = ({ selectorFn }: { selectorFn?: (newObject: Localit
|
||||
header: 'Gen locality',
|
||||
},
|
||||
{
|
||||
accessorKey: 'plate',
|
||||
id: 'plate',
|
||||
accessorFn: (row) => row.plate || 'N/A',
|
||||
header: 'Plate',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'formation',
|
||||
id: 'formation',
|
||||
accessorFn: (row) => row.formation || 'N/A',
|
||||
header: 'Formation',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'member',
|
||||
id: 'member',
|
||||
accessorFn: (row) => row.member || 'N/A',
|
||||
header: 'Member',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'bed',
|
||||
|
||||
@@ -14,66 +14,86 @@ export const SpeciesTable = ({ selectorFn }: { selectorFn?: (id: Species) => voi
|
||||
size: 20,
|
||||
},
|
||||
{
|
||||
accessorKey: 'subclass_or_superorder_name',
|
||||
id: 'subclass_or_superorder_name',
|
||||
accessorFn: (row) => row.subclass_or_superorder_name || 'N/A',
|
||||
header: 'Subclass or Superorder',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'order_name',
|
||||
header: 'Order',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'suborder_or_superfamily_name',
|
||||
id: 'suborder_or_superfamily_name',
|
||||
accessorFn: (row) => row.suborder_or_superfamily_name || 'N/A',
|
||||
header: 'Suborder or Superfamily',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'family_name',
|
||||
id: 'family_name',
|
||||
accessorFn: (row) => row.family_name || 'N/A',
|
||||
header: 'Family',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'subfamily_name',
|
||||
id: 'subfamily_name',
|
||||
accessorFn: (row) => row.subfamily_name || 'N/A',
|
||||
header: 'Subfamily or Tribe',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'genus_name',
|
||||
header: 'Genus',
|
||||
size: 20,
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'species_name',
|
||||
header: 'Species',
|
||||
size: 20,
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'unique_identifier',
|
||||
header: 'Unique Identifier',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'taxonomic_status',
|
||||
id: 'taxonomic_status',
|
||||
accessorFn: (row) => row.taxonomic_status || 'N/A',
|
||||
header: 'Taxonomic Status',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'common_name',
|
||||
id: 'common_name',
|
||||
accessorFn: (row) => row.common_name || 'N/A',
|
||||
header: 'Common Name',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'sp_author',
|
||||
id: 'sp_author',
|
||||
accessorFn: (row) => row.sp_author || 'N/A',
|
||||
header: 'Author',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'strain',
|
||||
id: 'strain',
|
||||
accessorFn: (row) => row.strain || 'N/A',
|
||||
header: 'Strain',
|
||||
size: 20,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'gene',
|
||||
@@ -81,14 +101,18 @@ export const SpeciesTable = ({ selectorFn }: { selectorFn?: (id: Species) => voi
|
||||
size: 20,
|
||||
},
|
||||
{
|
||||
accessorKey: 'body_mass',
|
||||
id: 'body_mass',
|
||||
accessorFn: (row) => row.body_mass || 'N/A',
|
||||
header: 'Body Mass',
|
||||
size: 20,
|
||||
filterVariant: 'range',
|
||||
},
|
||||
{
|
||||
accessorKey: 'brain_mass',
|
||||
id: 'brain_mass',
|
||||
accessorFn: (row) => row.brain_mass || 'N/A',
|
||||
header: 'Brain Mass',
|
||||
size: 20,
|
||||
filterVariant: 'range',
|
||||
},
|
||||
],
|
||||
[]
|
||||
|
||||
@@ -23,6 +23,7 @@ export const TimeBoundTable = ({
|
||||
accessorKey: 'b_name',
|
||||
header: 'Name',
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'age',
|
||||
@@ -32,6 +33,7 @@ export const TimeBoundTable = ({
|
||||
{
|
||||
accessorKey: 'b_comment',
|
||||
header: 'Comment',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
],
|
||||
[]
|
||||
|
||||
@@ -17,6 +17,7 @@ export const TimeUnitTable = ({ selectorFn }: { selectorFn?: (newTimeUnit: TimeU
|
||||
accessorKey: 'tu_display_name',
|
||||
header: 'Time Unit',
|
||||
enableHiding: false,
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'low_bound',
|
||||
@@ -31,6 +32,7 @@ export const TimeUnitTable = ({ selectorFn }: { selectorFn?: (newTimeUnit: TimeU
|
||||
{
|
||||
accessorKey: 'seq_name',
|
||||
header: 'Sequence',
|
||||
filterFn: 'contains',
|
||||
},
|
||||
{
|
||||
accessorKey: 'rank',
|
||||
|
||||
Reference in New Issue
Block a user