From 13d0160bff364bc4a76cb7371d93bfa7b5df7283 Mon Sep 17 00:00:00 2001 From: ismay Date: Tue, 19 Mar 2024 17:09:06 +0100 Subject: [PATCH] fix: apply recommended final form fix for array field --- src/components/FormFields/QueueTransfer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/FormFields/QueueTransfer.js b/src/components/FormFields/QueueTransfer.js index 01964cf2..aeb226a3 100644 --- a/src/components/FormFields/QueueTransfer.js +++ b/src/components/FormFields/QueueTransfer.js @@ -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 @@ -21,7 +21,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,