Table component with filter and search (#600)
* Initial table component with storybook example * Moved dependencies to package/core * Removed dependency to @backstage/core from base package.json * Clean up some examples and remove type from columns, replacing with property align instead * Removed more unused stuff and added toggle for filter input * Fixed some lint issues * Added example with material-table * Convert column array passed into MaterialTable Backstage component into MT column array. Allow multiple values in one cell * Removed subheader from MT * Nicer double value cell * Added custom sorting to example * Cleaned up stories a bit * Setting field instead of customSort * Improve styling. Still needs better theme integration * Using more colors from theme * Fixed typing issue * Removed react-table implementation and cleaned up material-table implementation * Fixed some type issues * Fixed lint issues
This commit is contained in:
committed by
GitHub
parent
031a4356f1
commit
190f11c8f7
@@ -20,13 +20,13 @@ export class AggregatorInventory implements Inventory {
|
||||
inventories: Inventory[] = [];
|
||||
|
||||
list(): Promise<Array<Component>> {
|
||||
return Promise.all(this.inventories.map(i => i.list())).then(lists =>
|
||||
return Promise.all(this.inventories.map((i) => i.list())).then((lists) =>
|
||||
lists.flat(),
|
||||
);
|
||||
}
|
||||
|
||||
item(id: string): Promise<Component | undefined> {
|
||||
return this.list().then(items => items.find(i => i.id === id));
|
||||
return this.list().then((items) => items.find((i) => i.id === id));
|
||||
}
|
||||
|
||||
enlist(inventory: Inventory) {
|
||||
|
||||
@@ -24,6 +24,6 @@ export class StaticInventory implements Inventory {
|
||||
}
|
||||
|
||||
item(id: string): Promise<Component | undefined> {
|
||||
return this.list().then(items => items.find(i => i.id === id));
|
||||
return this.list().then((items) => items.find((i) => i.id === id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ startServer({
|
||||
? Boolean(process.env.PLUGIN_CORS)
|
||||
: false,
|
||||
logger: getRootLogger(),
|
||||
}).catch(err => {
|
||||
}).catch((err) => {
|
||||
getRootLogger().error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user