Skip to content

Commit

Permalink
Fix "Failed prop type: TimePicker: prop type portalContainer is inv…
Browse files Browse the repository at this point in the history
…alid" error
  • Loading branch information
wojtekmaj committed Aug 8, 2023
1 parent 799845f commit 4cb13b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,14 @@ TimePicker.propTypes = {
onClockOpen: PropTypes.func,
onFocus: PropTypes.func,
openClockOnFocus: PropTypes.bool,
portalContainer: isBrowser ? PropTypes.instanceOf(HTMLElement) : undefined,
required: PropTypes.bool,
secondAriaLabel: PropTypes.string,
secondPlaceholder: PropTypes.string,
value: isValueOrValueArray,
};

if (isBrowser) {
TimePicker.propTypes.portalContainer = PropTypes.instanceOf(HTMLElement);
}

export default TimePicker;

0 comments on commit 4cb13b2

Please sign in to comment.