diff --git a/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/ValuesColumn.test.js b/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/ValuesColumn.test.js index d47cdd16..a5dc00cc 100644 --- a/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/ValuesColumn.test.js +++ b/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/ValuesColumn.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { render, fireEvent, waitFor, cleanup } from '@testing-library/react'; +import { render, fireEvent, waitFor } from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect'; import '../../../../../../test/jest/__mock__/reactIntl.mock'; import { IntlProvider } from 'react-intl'; @@ -69,10 +69,6 @@ describe('ValuesColumn Component', () => { }); }); - afterEach(() => { - cleanup(); - }); - it('should render TextField when action type is INPUT', async () => { const { getByRole } = renderComponent(() => CONTROL_TYPES.INPUT); const element = getByRole('textbox'); diff --git a/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/controls/InstanceStatisticalCodesControl.js b/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/controls/InstanceStatisticalCodesControl.js index 1810aebb..954e20f5 100644 --- a/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/controls/InstanceStatisticalCodesControl.js +++ b/src/components/BulkEditPane/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/controls/InstanceStatisticalCodesControl.js @@ -16,6 +16,14 @@ export const InstanceStatisticalCodesControl = ({ actionName, actionValue, actio const sortedStatisticalCodes = sortWithoutPlaceholder(statisticalCodes); const title = getLabelByValue(sortedStatisticalCodes, actionValue); + const handleChange = value => { + onChange({ + actionIndex, + value, + fieldName: FIELD_VALUE_KEY, + }); + }; + if (isStatisticalCodesLoading) return ; return ( @@ -24,13 +32,7 @@ export const InstanceStatisticalCodesControl = ({ actionName, actionValue, actio key={actionName} id="statisticalCodes" value={actionValue} - onChange={value => { - onChange({ - actionIndex, - value, - fieldName: FIELD_VALUE_KEY, - }); - }} + onChange={handleChange} placeholder={formatMessage({ id: 'ui-bulk-edit.layer.statisticalCode' })} aria-label={formatMessage({ id: 'ui-bulk-edit.ariaLabel.statisticalCode' })} dataOptions={statisticalCodes}