Fix bugs on pipeline new card creation and checkboxes not scrollable

This commit is contained in:
Charles Bochet
2023-07-16 01:19:26 -07:00
parent fcdc82c07a
commit 098cd038bd
4 changed files with 17 additions and 48 deletions

View File

@ -1,35 +0,0 @@
import { useCallback } from 'react';
import { useRecoilScopedState } from '@/recoil-scope/hooks/useRecoilScopedState';
import { SingleEntitySelect } from '@/relation-picker/components/SingleEntitySelect';
import { relationPickerSearchFilterScopedState } from '@/relation-picker/states/relationPickerSearchFilterScopedState';
import { useFilteredSearchCompanyQuery } from '../queries';
export function NewCompanyBoardCard() {
const [searchFilter] = useRecoilScopedState(
relationPickerSearchFilterScopedState,
);
const companies = useFilteredSearchCompanyQuery({ searchFilter });
const handleEntitySelect = useCallback(async (companyId: string) => {
return;
}, []);
function handleCancel() {
return;
}
return (
<SingleEntitySelect
onEntitySelected={(value) => handleEntitySelect(value.id)}
onCancel={handleCancel}
entities={{
entitiesToSelect: companies.entitiesToSelect,
selectedEntity: companies.selectedEntities[0],
loading: companies.loading,
}}
/>
);
}

View File

@ -96,18 +96,16 @@ export function NewCompanyProgressButton() {
return (
<>
{isCreatingCard ? (
<RecoilScope>
<SingleEntitySelect
onEntitySelected={(value) => handleEntitySelect(value)}
onCancel={handleCancel}
entities={{
entitiesToSelect: companies.entitiesToSelect,
selectedEntity: companies.selectedEntities[0],
loading: companies.loading,
}}
disableBackgroundBlur={true}
/>
</RecoilScope>
<SingleEntitySelect
onEntitySelected={(value) => handleEntitySelect(value)}
onCancel={handleCancel}
entities={{
entitiesToSelect: companies.entitiesToSelect,
selectedEntity: companies.selectedEntities[0],
loading: companies.loading,
}}
disableBackgroundBlur={true}
/>
) : (
<NewButton onClick={handleNewClick} />
)}

View File

@ -1,9 +1,14 @@
import { CompanyBoardCard } from '@/companies/components/CompanyBoardCard';
import { NewCompanyProgressButton } from '@/companies/components/NewCompanyProgressButton';
import { RecoilScope } from '@/recoil-scope/components/RecoilScope';
import { BoardOptions } from '../../pipeline-progress/types/BoardOptions';
export const companyBoardOptions: BoardOptions = {
newCardComponent: <NewCompanyProgressButton />,
newCardComponent: (
<RecoilScope>
<NewCompanyProgressButton />
</RecoilScope>
),
cardComponent: <CompanyBoardCard />,
};

View File

@ -12,6 +12,7 @@ type OwnProps = {
const StyledInputContainer = styled.div`
align-items: center;
display: flex;
position: relative;
`;
const StyledInput = styled.input<{ indeterminate?: boolean }>`