Fixed: In CSV import now users are able to come back to the previous step. (#5625)
Users now can make a back transition from the current step state. - Added a `BackButton` component to `spreadsheet-import` in order to use it within the step state components. - Used the prebuilt `prevStep` from `useStepBar` and passed it as a prop to the `Uploadflow` to get the previous state as activestep. - Added a `previousState` to set the previous state with the required key data. - Added a `handleOnBack` function in `Uploadflow` to set the correct state and call the `prevStep` function to make the transition. - Added a callback function `onBack` and passed it as props to each step state component. fixes: #5564 https://github.com/twentyhq/twenty/assets/140178357/be7e1a0a-0fb8-41f2-a207-dfc3208ca6f0 --------- Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
This commit is contained in:
committed by
GitHub
parent
a12c1aad5e
commit
c7f2150ac7
@ -16,22 +16,22 @@ const StyledButton = styled(MainButton)`
|
||||
width: 200px;
|
||||
`;
|
||||
|
||||
type ContinueButtonProps = {
|
||||
onContinue: (val: any) => void;
|
||||
type StepNavigationButtonProps = {
|
||||
onClick: () => void;
|
||||
title: string;
|
||||
isLoading?: boolean;
|
||||
};
|
||||
|
||||
export const ContinueButton = ({
|
||||
onContinue,
|
||||
export const StepNavigationButton = ({
|
||||
onClick,
|
||||
title,
|
||||
isLoading,
|
||||
}: ContinueButtonProps) => (
|
||||
}: StepNavigationButtonProps) => (
|
||||
<StyledFooter>
|
||||
<StyledButton
|
||||
Icon={isLoading ? CircularProgressBar : undefined}
|
||||
title={title}
|
||||
onClick={!isLoading ? onContinue : undefined}
|
||||
onClick={!isLoading ? onClick : undefined}
|
||||
/>
|
||||
</StyledFooter>
|
||||
);
|
||||
Reference in New Issue
Block a user