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 committed Mar 19, 2024
1 parent 7d9c0c4 commit f0df8d4
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

0 comments on commit f0df8d4

Please sign in to comment.