Skip to content

Commit

Permalink
feat: filtering of recipe table
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Lechner <[email protected]>
  • Loading branch information
lechnerc77 committed Apr 16, 2024
1 parent f67f4e6 commit dca4de4
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions plugins/plugin-radius/src/components/recipes/RecipeTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Table, TableColumn } from '@backstage/core-components';
import { Table, TableColumn, TableFilter } from '@backstage/core-components';
import { EnvironmentProperties, Resource } from '../../resources';

interface DisplayRecipe {
Expand Down Expand Up @@ -41,12 +41,33 @@ export const RecipeTable = ({
{ title: 'Template Path', field: 'templatePath' },
];

const filters: TableFilter[] = [
{
column: 'Name',
type: 'select',
},
{
column: 'Type',
type: 'multiple-select',
},
{
column: 'Kind',
type: 'multiple-select',
},
{
column: 'Template Path',
type: 'multiple-select',
},

];

return (
<Table
title={title || 'Recipes'}
options={{ search: false, paging: false }}
options={{ search: true, paging: false, sorting: true}}
columns={columns}
data={recipes}
filters={filters}
/>
);
};
};

0 comments on commit dca4de4

Please sign in to comment.