Refactor/filters (#498)
* wip * - Added scopes on useHotkeys - Use new EditableCellV2 - Implemented Recoil Scoped State with specific context - Implemented soft focus position - Factorized open/close editable cell - Removed editable relation old components - Broke down entity table into multiple components - Added Recoil Scope by CellContext - Added Recoil Scope by RowContext * First working version * Use a new EditableCellSoftFocusMode * Fixes * wip * wip * wip * Use company filters * Refactored FilterDropdown into multiple components * Refactored entity search select in dropdown * Renamed states * Fixed people filters * Removed unused code * Cleaned states * Cleaned state * Better naming * fixed rebase * Fix * Fixed stories and mocked data and displayName bug * Fixed cancel sort * Fixed naming * Fixed dropdown height * Fix * Fixed lint
This commit is contained in:
@ -3,9 +3,14 @@ import { MemoryRouter } from 'react-router-dom';
|
||||
import { ApolloProvider } from '@apollo/client';
|
||||
import { RecoilRoot } from 'recoil';
|
||||
|
||||
import { RecoilScope } from '@/recoil-scope/components/RecoilScope';
|
||||
import { HooksEntityTable } from '@/ui/components/table/HooksEntityTable';
|
||||
import { DefaultLayout } from '@/ui/layout/DefaultLayout';
|
||||
import { TableContext } from '@/ui/tables/states/TableContext';
|
||||
import { companiesFilters } from '~/pages/companies/companies-filters';
|
||||
import { UserProvider } from '~/providers/user/UserProvider';
|
||||
|
||||
import { mockedCompaniesData } from './mock-data/companies';
|
||||
import { ComponentStorybookLayout } from './ComponentStorybookLayout';
|
||||
import { FullHeightStorybookLayout } from './FullHeightStorybookLayout';
|
||||
import { mockedClient } from './mockedClient';
|
||||
@ -42,3 +47,24 @@ export function getRenderWrapperForComponent(children: React.ReactElement) {
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function getRenderWrapperForEntityTableComponent(
|
||||
children: React.ReactElement,
|
||||
) {
|
||||
return function Render() {
|
||||
return (
|
||||
<RecoilRoot>
|
||||
<ApolloProvider client={mockedClient}>
|
||||
<RecoilScope SpecificContext={TableContext}>
|
||||
<HooksEntityTable
|
||||
availableTableFilters={companiesFilters}
|
||||
numberOfColumns={5}
|
||||
numberOfRows={mockedCompaniesData.length}
|
||||
/>
|
||||
<ComponentStorybookLayout>{children}</ComponentStorybookLayout>
|
||||
</RecoilScope>
|
||||
</ApolloProvider>
|
||||
</RecoilRoot>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user