Skip to content

Commit c62220c

Browse files
fix(react): spread args onto onChange from props (#11212)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 91fe1bf commit c62220c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react/src/components/DatePicker/next/DatePicker.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,11 @@ function DatePicker({
328328
clickOpens: true,
329329
nextArrow: rightArrowHTML,
330330
prevArrow: leftArrowHTML,
331-
onChange: savedOnChange,
331+
onChange: (...args) => {
332+
if (savedOnChange) {
333+
savedOnChange(...args);
334+
}
335+
},
332336
onClose: savedOnClose,
333337
onReady: onHook,
334338
onMonthChange: onHook,

0 commit comments

Comments
 (0)