Fix Views on People page (#2265)
* fetching viewId for url * fixed option menu name input * fix table import * fix unnecessary rerenders * people working --------- Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
@ -25,7 +25,6 @@ export const HooksCompanyBoardEffect = () => {
|
||||
setAvailableFilters,
|
||||
setAvailableSorts,
|
||||
setEntityCountInCurrentView,
|
||||
setCurrentViewId,
|
||||
} = useView();
|
||||
|
||||
const { currentViewFilters } = useViewInternalStates();
|
||||
@ -106,10 +105,6 @@ export const HooksCompanyBoardEffect = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!loading && pipeline && pipelineProgresses && companiesData) {
|
||||
const viewId = searchParams.get('view');
|
||||
if (viewId) {
|
||||
//setCurrentViewId(viewId);
|
||||
}
|
||||
setActionBarEntries();
|
||||
setContextMenuEntries();
|
||||
updateCompanyBoard(pipeline, pipelineProgresses, companiesData.companies);
|
||||
@ -125,7 +120,6 @@ export const HooksCompanyBoardEffect = () => {
|
||||
setContextMenuEntries,
|
||||
searchParams,
|
||||
setEntityCountInCurrentView,
|
||||
setCurrentViewId,
|
||||
]);
|
||||
|
||||
return <></>;
|
||||
|
||||
@ -3,6 +3,7 @@ import styled from '@emotion/styled';
|
||||
import { getCompaniesOptimisticEffectDefinition } from '@/companies/graphql/optimistic-effect-definitions/getCompaniesOptimisticEffectDefinition';
|
||||
import { useCompanyTableActionBarEntries } from '@/companies/hooks/useCompanyTableActionBarEntries';
|
||||
import { useCompanyTableContextMenuEntries } from '@/companies/hooks/useCompanyTableContextMenuEntries';
|
||||
import { useSpreadsheetCompanyImport } from '@/companies/hooks/useSpreadsheetCompanyImport';
|
||||
import { DataTable } from '@/ui/data/data-table/components/DataTable';
|
||||
import { DataTableEffect } from '@/ui/data/data-table/components/DataTableEffect';
|
||||
import { TableContext } from '@/ui/data/data-table/contexts/TableContext';
|
||||
@ -66,6 +67,9 @@ export const CompanyTable = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const { openCompanySpreadsheetImport: onImport } =
|
||||
useSpreadsheetCompanyImport();
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -92,7 +96,7 @@ export const CompanyTable = () => {
|
||||
<ViewBarEffect />
|
||||
|
||||
<ViewBar
|
||||
optionsDropdownButton={<TableOptionsDropdown />}
|
||||
optionsDropdownButton={<TableOptionsDropdown onImport={onImport} />}
|
||||
optionsDropdownScopeId="table-dropdown-option"
|
||||
/>
|
||||
<CompanyTableEffect />
|
||||
|
||||
Reference in New Issue
Block a user