Fix bugs on pipeline new card creation and checkboxes not scrollable
This commit is contained in:
@ -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,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -96,18 +96,16 @@ export function NewCompanyProgressButton() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isCreatingCard ? (
|
{isCreatingCard ? (
|
||||||
<RecoilScope>
|
<SingleEntitySelect
|
||||||
<SingleEntitySelect
|
onEntitySelected={(value) => handleEntitySelect(value)}
|
||||||
onEntitySelected={(value) => handleEntitySelect(value)}
|
onCancel={handleCancel}
|
||||||
onCancel={handleCancel}
|
entities={{
|
||||||
entities={{
|
entitiesToSelect: companies.entitiesToSelect,
|
||||||
entitiesToSelect: companies.entitiesToSelect,
|
selectedEntity: companies.selectedEntities[0],
|
||||||
selectedEntity: companies.selectedEntities[0],
|
loading: companies.loading,
|
||||||
loading: companies.loading,
|
}}
|
||||||
}}
|
disableBackgroundBlur={true}
|
||||||
disableBackgroundBlur={true}
|
/>
|
||||||
/>
|
|
||||||
</RecoilScope>
|
|
||||||
) : (
|
) : (
|
||||||
<NewButton onClick={handleNewClick} />
|
<NewButton onClick={handleNewClick} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
import { CompanyBoardCard } from '@/companies/components/CompanyBoardCard';
|
import { CompanyBoardCard } from '@/companies/components/CompanyBoardCard';
|
||||||
import { NewCompanyProgressButton } from '@/companies/components/NewCompanyProgressButton';
|
import { NewCompanyProgressButton } from '@/companies/components/NewCompanyProgressButton';
|
||||||
|
import { RecoilScope } from '@/recoil-scope/components/RecoilScope';
|
||||||
|
|
||||||
import { BoardOptions } from '../../pipeline-progress/types/BoardOptions';
|
import { BoardOptions } from '../../pipeline-progress/types/BoardOptions';
|
||||||
|
|
||||||
export const companyBoardOptions: BoardOptions = {
|
export const companyBoardOptions: BoardOptions = {
|
||||||
newCardComponent: <NewCompanyProgressButton />,
|
newCardComponent: (
|
||||||
|
<RecoilScope>
|
||||||
|
<NewCompanyProgressButton />
|
||||||
|
</RecoilScope>
|
||||||
|
),
|
||||||
cardComponent: <CompanyBoardCard />,
|
cardComponent: <CompanyBoardCard />,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -12,6 +12,7 @@ type OwnProps = {
|
|||||||
const StyledInputContainer = styled.div`
|
const StyledInputContainer = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
position: relative;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledInput = styled.input<{ indeterminate?: boolean }>`
|
const StyledInput = styled.input<{ indeterminate?: boolean }>`
|
||||||
|
|||||||
Reference in New Issue
Block a user