Skip to content

Commit 63d8f4e

Browse files
Vivek Domadiyasimson1
authored andcommitted
fix: review comments
1 parent 67b4678 commit 63d8f4e

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

packages/react/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.jsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -337,24 +337,16 @@ const DataSeriesFormItem = ({
337337
...item,
338338
// create a unique dataSourceId if it's going into attributes
339339
// if it's going into the groupBy section then just use the dataItem ID
340-
dataSourceId:
341-
item?.destination === 'groupBy' ? item.dataItemId : `${item.dataItemId}_${uuidv4()}`,
340+
dataSourceId: `${item.dataItemId}_${uuidv4()}`,
342341
}));
343342

344343
const selectedItems = canMultiSelectDataItems
345344
? [...dataSection, ...updatedItems]
346345
: [updatedItems[0]];
347346

348-
// need to remove the category if the card is a stacked timeseries bar
349-
const card =
350-
cardConfig.content.type === BAR_CHART_TYPES.STACKED &&
351-
cardConfig.content.timeDataSourceId &&
352-
selectedItems.length > 1
353-
? omit(cardConfig, 'content.categoryDataSourceId')
354-
: cardConfig;
355347
const newCard = handleDataSeriesChange(
356348
selectedItems,
357-
card,
349+
cardConfig,
358350
setEditDataSeries,
359351
undefined,
360352
removedItemsCountRef

packages/react/src/components/CardEditor/CardEditForm/CardEditFormItems/TableCardFormItems/TableCardFormContent.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ const TableCardFormContent = ({
218218
...item,
219219
// create a unique dataSourceId if it's going into attributes
220220
// if it's going into the groupBy section then just use the dataItem ID
221-
dataSourceId:
222-
item?.destination === 'groupBy' ? item.dataItemId : `${item.dataItemId}_${uuidv4()}`,
221+
dataSourceId: `${item.dataItemId}_${uuidv4()}`,
223222
}));
224223
const selectedItems = [...dataSection, ...updatedItems];
225224

0 commit comments

Comments
 (0)