Skip to content

Commit

Permalink
Adding filters to arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-Wood-Eric committed Sep 4, 2024
1 parent 69b881c commit 73c7860
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/jira-dashboard/src/components/JiraTable/JiraTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import { columns } from './columns';

type Props = {
tableContent: JiraDataResponse;
filters?: TableFilter[];
};

export const JiraTable = ({ tableContent }: Props) => {
export const JiraTable = ({ tableContent, filters }: Props) => {
if (!tableContent) {
return (
<ErrorPanel
Expand All @@ -25,7 +26,7 @@ export const JiraTable = ({ tableContent }: Props) => {
}
const nbrOfIssues = tableContent?.issues?.length ?? 0;

const filters: TableFilter[] | undefined = [
const defaultFilters: TableFilter[] | undefined = [
{
column: 'Status',
type: 'multiple-select',
Expand All @@ -50,7 +51,7 @@ export const JiraTable = ({ tableContent }: Props) => {
padding: 'dense',
search: true,
}}
filters={filters}
filters={filters || defaultFilters}
data={tableContent.issues || []}
columns={columns}
emptyContent={
Expand Down

0 comments on commit 73c7860

Please sign in to comment.