selectors.ts 433 B

1234567891011
  1. export const getDataSources = state => {
  2. const regex = new RegExp(state.searchQuery, 'i');
  3. return state.dataSources.filter(dataSource => {
  4. return regex.test(dataSource.name) || regex.test(dataSource.database);
  5. });
  6. };
  7. export const getDataSourcesSearchQuery = state => state.searchQuery;
  8. export const getDataSourcesLayoutMode = state => state.layoutMode;
  9. export const getDataSourcesCount = state => state.dataSourcesCount;