Import - Upsert on composite fields (#12615)
To test : - Import a record with Id column (for upsert-ing) + some subfields in each composite fields. Check that only matched subfields are updated (Main issue) - Import a record with a multi-select field - Check it works + Match multi-select field on a non multi-select column, check it does not work. (Specific bug fixed in second commit is : undefined value in multi select column (corresponding to no item selected) caused error in multi-select parsing). closes https://github.com/twentyhq/core-team-issues/issues/990
This commit is contained in:
-9
@@ -30,7 +30,6 @@ export const MatchColumnSelectFieldSelectDropdownContent = ({
|
||||
onSelectSuggestedOption,
|
||||
onCancelSelect,
|
||||
onDoNotImportSelect,
|
||||
options,
|
||||
suggestedOptions,
|
||||
}: {
|
||||
selectedValue: SelectOption | undefined;
|
||||
@@ -40,9 +39,6 @@ export const MatchColumnSelectFieldSelectDropdownContent = ({
|
||||
onSelectSuggestedOption: (selectedSuggestedOption: SelectOption) => void;
|
||||
onCancelSelect: () => void;
|
||||
onDoNotImportSelect: () => void;
|
||||
options: readonly ReadonlyDeep<
|
||||
SelectOption & { fieldMetadataTypeLabel?: string }
|
||||
>[];
|
||||
suggestedOptions: readonly ReadonlyDeep<
|
||||
SelectOption & { fieldMetadataTypeLabel?: string }
|
||||
>[];
|
||||
@@ -121,7 +117,6 @@ export const MatchColumnSelectFieldSelectDropdownContent = ({
|
||||
key={option.value}
|
||||
selected={selectedValue?.value === option.value}
|
||||
onClick={() => handleSuggestedOptionClick(option)}
|
||||
disabled={option.disabled}
|
||||
LeftIcon={option.Icon}
|
||||
text={option.label}
|
||||
contextualText={option.fieldMetadataTypeLabel}
|
||||
@@ -140,10 +135,6 @@ export const MatchColumnSelectFieldSelectDropdownContent = ({
|
||||
key={field.id}
|
||||
selected={selectedValue?.value === field.name}
|
||||
onClick={() => handleFieldClick(field)}
|
||||
disabled={
|
||||
options.find((option) => option.value === field.name)
|
||||
?.disabled && selectedValue?.value !== field.name
|
||||
}
|
||||
LeftIcon={getIcon(field.icon)}
|
||||
text={field.label}
|
||||
contextualText={getFieldMetadataTypeLabel(field.type)}
|
||||
|
||||
-1
@@ -150,7 +150,6 @@ export const MatchColumnToFieldSelect = ({
|
||||
onSelectSuggestedOption={handleSelectSuggestedOption}
|
||||
onCancelSelect={handleCancelSelectClick}
|
||||
onDoNotImportSelect={handleDoNotImportSelect}
|
||||
options={options}
|
||||
suggestedOptions={suggestedOptions}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user