The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
5236 expandable list leave options when editing (#5890)
martmulld8034b1f40ae
diff --git a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsxindex 0c884b2035a..bec5740b5cb 100644--- a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx+++ b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx@@ -22,9 +22,9 @@ import { ObjectRecordForSelect } from '@/object-record/relation-picker/hooks/useimport { prefillRecord } from '@/object-record/utils/prefillRecord';const StyledSelectContainer = styled.div`- left: 0px;position: absolute;- top: -8px;+ left: 0;+ top: 0;`;type ActivityTargetInlineCellEditModeProps = {diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsxindex cb2d67b7aaa..1514ec9f313 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx@@ -34,7 +34,8 @@ const StyledLabelAndIconContainer = styled.div`const StyledValueContainer = styled.div`display: flex;- width: 100%;+ flex-grow: 1;+ min-width: 0;`;const StyledLabelContainer = styled.div<{ width?: number }>`diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsxindex a1042ddd059..08a5cadba41 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx@@ -72,35 +72,40 @@ export const RecordInlineCellValue = ({return <RecordInlineCellSkeletonLoader />;}- return !readonly && isInlineCellInEditMode ? (- <RecordInlineCellEditMode>{editModeContent}</RecordInlineCellEditMode>- ) : editModeContentOnly ? (- <StyledClickableContainer readonly={readonly}>- <RecordInlineCellDisplayMode- disableHoverEffect={disableHoverEffect}- isDisplayModeContentEmpty={isDisplayModeContentEmpty}- isDisplayModeFixHeight={isDisplayModeFixHeight}- isHovered={isFocused}- emptyPlaceholder={showLabel ? 'Empty' : label}- >- {editModeContent}- </RecordInlineCellDisplayMode>- </StyledClickableContainer>- ) : (- <StyledClickableContainer- readonly={readonly}- onClick={handleDisplayModeClick}- >- <RecordInlineCellDisplayMode- disableHoverEffect={disableHoverEffect}- isDisplayModeContentEmpty={isDisplayModeContentEmpty}- isDisplayModeFixHeight={isDisplayModeFixHeight}- isHovered={isFocused}- emptyPlaceholder={showLabel ? 'Empty' : label}- >- {displayModeContent}- </RecordInlineCellDisplayMode>- {showEditButton && <RecordInlineCellButton Icon={buttonIcon} />}- </StyledClickableContainer>+ return (+ <>+ {!readonly && isInlineCellInEditMode && (+ <RecordInlineCellEditMode>{editModeContent}</RecordInlineCellEditMode>+ )}+ {editModeContentOnly ? (+ <StyledClickableContainer readonly={readonly}>+ <RecordInlineCellDisplayMode+ disableHoverEffect={disableHoverEffect}+ isDisplayModeContentEmpty={isDisplayModeContentEmpty}+ isDisplayModeFixHeight={isDisplayModeFixHeight}+ isHovered={isFocused}+ emptyPlaceholder={showLabel ? 'Empty' : label}+ >+ {editModeContent}+ </RecordInlineCellDisplayMode>+ </StyledClickableContainer>+ ) : (+ <StyledClickableContainer+ readonly={readonly}+ onClick={handleDisplayModeClick}+ >+ <RecordInlineCellDisplayMode+ disableHoverEffect={disableHoverEffect}+ isDisplayModeContentEmpty={isDisplayModeContentEmpty}+ isDisplayModeFixHeight={isDisplayModeFixHeight}+ isHovered={isFocused}+ emptyPlaceholder={showLabel ? 'Empty' : label}+ >+ {displayModeContent}+ </RecordInlineCellDisplayMode>+ {showEditButton && <RecordInlineCellButton Icon={buttonIcon} />}+ </StyledClickableContainer>+ )}+ </>);};diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellContainer.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellContainer.tsxindex 6ff27ac7339..48b3f5ce25f 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellContainer.tsx@@ -142,15 +142,14 @@ export const RecordTableCellContainer = ({[styles.cellBaseContainerSoftFocus]: hasSoftFocus,})}>- {isInEditMode ? (+ {isInEditMode && (<RecordTableCellEditMode>{editModeContent}</RecordTableCellEditMode>- ) : hasSoftFocus ? (- <>- <RecordTableCellSoftFocusMode- editModeContent={editModeContent}- nonEditModeContent={nonEditModeContent}- />- </>+ )}+ {hasSoftFocus ? (+ <RecordTableCellSoftFocusMode+ editModeContent={editModeContent}+ nonEditModeContent={nonEditModeContent}+ />) : (<RecordTableCellDisplayMode>{nonEditModeContent}diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsxindex 99c52de425d..16e59db8d55 100644--- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditMode.tsx@@ -4,6 +4,7 @@ import styled from '@emotion/styled';import { autoUpdate, flip, offset, useFloating } from '@floating-ui/react';const StyledEditableCellEditModeContainer = styled.div<RecordTableCellEditModeProps>`+ position: absolute;align-items: center;display: flex;min-width: 200px;