1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

Fix: global filter table rules (#1016)

This commit is contained in:
Tymoteusz Czech 2022-05-27 16:15:32 +02:00 committed by GitHub
parent eb5e83cdb4
commit 581dcca2b2
2 changed files with 14 additions and 1 deletions

View File

@ -52,6 +52,7 @@ const columns = [
sortType: 'date', sortType: 'date',
align: 'center', align: 'center',
maxWidth: 85, maxWidth: 85,
disableGlobalFilter: true,
}, },
{ {
Header: 'Type', Header: 'Type',
@ -59,6 +60,7 @@ const columns = [
Cell: FeatureTypeCell, Cell: FeatureTypeCell,
align: 'center', align: 'center',
maxWidth: 85, maxWidth: 85,
disableGlobalFilter: true,
}, },
{ {
Header: 'Feature toggle name', Header: 'Feature toggle name',
@ -73,6 +75,7 @@ const columns = [
Cell: DateCell, Cell: DateCell,
sortType: 'date', sortType: 'date',
maxWidth: 150, maxWidth: 150,
disableGlobalFilter: true,
}, },
{ {
Header: 'Project ID', Header: 'Project ID',
@ -89,6 +92,7 @@ const columns = [
Cell: FeatureStaleCell, Cell: FeatureStaleCell,
sortType: 'boolean', sortType: 'boolean',
maxWidth: 120, maxWidth: 120,
disableGlobalFilter: true,
}, },
// Always hidden -- for search // Always hidden -- for search
{ {
@ -210,7 +214,11 @@ export const FeatureToggleListTable: VFC = () => {
isLoading={loading} isLoading={loading}
header={ header={
<PageHeader <PageHeader
title={`Feature toggles (${data.length})`} title={`Feature toggles (${
rows.length < data.length
? `${rows.length} of ${data.length}`
: data.length
})`}
actions={ actions={
<> <>
<TableSearch <TableSearch

View File

@ -181,12 +181,14 @@ export const ProjectFeatureToggles = ({
Cell: FeatureSeenCell, Cell: FeatureSeenCell,
sortType: 'date', sortType: 'date',
align: 'center', align: 'center',
disableGlobalFilter: true,
}, },
{ {
Header: 'Type', Header: 'Type',
accessor: 'type', accessor: 'type',
Cell: FeatureTypeCell, Cell: FeatureTypeCell,
align: 'center', align: 'center',
disableGlobalFilter: true,
}, },
{ {
Header: 'Feature toggle name', Header: 'Feature toggle name',
@ -208,6 +210,7 @@ export const ProjectFeatureToggles = ({
Cell: DateCell, Cell: DateCell,
sortType: 'date', sortType: 'date',
align: 'center', align: 'center',
disableGlobalFilter: true,
}, },
...environments.map(name => ({ ...environments.map(name => ({
Header: loading ? () => '' : name, Header: loading ? () => '' : name,
@ -215,6 +218,7 @@ export const ProjectFeatureToggles = ({
minWidth: 90, minWidth: 90,
accessor: `environments.${name}`, accessor: `environments.${name}`,
align: 'center', align: 'center',
disableGlobalFilter: true,
Cell: ({ Cell: ({
value, value,
row: { original: feature }, row: { original: feature },
@ -244,6 +248,7 @@ export const ProjectFeatureToggles = ({
<ActionsCell projectId={projectId} {...props} /> <ActionsCell projectId={projectId} {...props} />
), ),
disableSortBy: true, disableSortBy: true,
disableGlobalFilter: true,
}, },
], ],
[projectId, environments, onToggle, loading] [projectId, environments, onToggle, loading]