Skip to content

Commit

Permalink
fix: apply recommended final form fix for array field
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay authored and ismay committed Apr 2, 2024
1 parent ac10e1f commit 13d0160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/FormFields/QueueTransfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Field, Transfer } from '@dhis2/ui'
import QueueTransferTitle from './QueueTransferTitle'
import QueueOption from './QueueOption'

const { bool, arrayOf, shape, func, array, string } = PropTypes
const { bool, arrayOf, shape, func, array, string, oneOfType } = PropTypes

const QueueTransfer = ({ options, input, meta }) => {
const { onChange, value } = input
Expand All @@ -21,7 +21,7 @@ const QueueTransfer = ({ options, input, meta }) => {
>
<Transfer
options={options}
selected={value}
selected={[...value]}
renderOption={QueueOption}
filterable
filterPlaceholder={i18n.t('Filter jobs')}
Expand All @@ -41,7 +41,7 @@ const QueueTransfer = ({ options, input, meta }) => {
QueueTransfer.propTypes = {
input: shape({
onChange: func.isRequired,
value: array.isRequired,
value: oneOfType([string, array]).isRequired,
}).isRequired,
meta: shape({
error: string,
Expand Down

1 comment on commit 13d0160

@dhis2-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.