File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import React from 'react';
22import PropTypes from 'prop-types' ;
33import { getISOLocalDateTime } from '@wojtekmaj/date-utils' ;
44
5- import { isValue } from './shared/propTypes' ;
6-
75import type { LooseValue } from './shared/types' ;
86
97type ValueOptionsProps = {
@@ -117,9 +115,13 @@ export default function ValueOptions({
117115 ) ;
118116}
119117
118+ const isValue = PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Date ) ] ) ;
119+
120+ const isValueOrValueArray = PropTypes . oneOfType ( [ isValue , PropTypes . arrayOf ( isValue ) ] ) ;
121+
120122ValueOptions . propTypes = {
121123 selectRange : PropTypes . bool ,
122124 setSelectRange : PropTypes . func . isRequired ,
123125 setValue : PropTypes . func . isRequired ,
124- value : PropTypes . oneOfType ( [ PropTypes . string , isValue ] ) ,
126+ value : isValueOrValueArray ,
125127} ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments