Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: turned columnvisibility into a static object #126

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/components/PagerDutyPage/MappingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const MappingTable = ({
const columns = useMemo<MRT_ColumnDef<PagerDutyEntityMapping>[]>(
() => [
{
id: "serviceId",
accessorKey: "serviceId",
header: "Service ID",
visibleInShowHideMenu: false,
Expand All @@ -109,34 +110,40 @@ export const MappingTable = ({
),
},
{
id: "integrationKey",
accessorKey: "integrationKey",
header: "Integration Key",
visibleInShowHideMenu: false,
enableEditing: false,
Edit: () => null,
},
{
id: "serviceName",
accessorKey: "serviceName",
header: "PagerDuty Service",
enableEditing: false,
},
{
id: "account",
accessorKey: "account",
header: "Account",
enableEditing: false,
Edit: () => null,
},
{
id: "team",
accessorKey: "team",
header: "Team",
enableEditing: false,
},
{
id: "escalationPolicy",
accessorKey: "escalationPolicy",
header: "Escalation Policy",
enableEditing: false,
},
{
id: "entityRef",
accessorKey: "entityRef",
header: "Mapping",
visibleInShowHideMenu: false,
Expand All @@ -151,12 +158,14 @@ export const MappingTable = ({
},
},
{
id: "entityName",
accessorKey: "entityName",
header: "Mapped Entity Name",
enableEditing: false,
Edit: () => null,
},
{
id: "status",
accessorKey: "status",
header: "Status",
enableEditing: false,
Expand All @@ -174,6 +183,7 @@ export const MappingTable = ({
),
},
{
id: "serviceUrl",
accessorKey: "serviceUrl",
header: "Service URL",
visibleInShowHideMenu: false,
Expand Down Expand Up @@ -297,6 +307,8 @@ export const MappingTable = ({
showAlertBanner:
mappings === undefined || catalogEntities === undefined,
showProgressBars: mappings.length === 0 || catalogEntities.length === 0,
},
initialState: {
columnVisibility: {
serviceId: false,
entityRef: false,
Expand Down
Loading