Skip to content

Commit 460fe05

Browse files
committed
fix(utils): fix application selector
1 parent 8211642 commit 460fe05

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/utils/src/selectors/tablesListSelectors.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ export const getUserTables: ParametricSelector<TableSchema[], void, TableSchema[
6464
tablesList => tablesList.filter(tableSelectors.isUserTable),
6565
);
6666

67-
export const getApplicationTables: ParametricSelector<TableSchema[], void, TableSchema[]> = createSelector(
67+
export const getApplicationTables: ParametricSelector<TableSchema[], string, TableSchema[]> = createSelector(
6868
getTableList,
69-
tablesList => tablesList.filter(({ application }) => !!application),
70-
);
69+
(_, appName: string) => appName,
70+
(tablesList, appName) => tablesList.filter(
71+
({ application }) => application && application.name === appName,
72+
));
7173

7274
export const getViewTables: ParametricSelector<TableSchema[], void, TableSchema[]> = createSelector(
7375
getTableList,

0 commit comments

Comments
 (0)