Skip to content

Commit

Permalink
Fix React warning when Events are referenced later
Browse files Browse the repository at this point in the history
Fixes react-dates/react-dates#514 , which happens due to Events being stored to be delivered on the trailing edge of a keyDown. I believe we don't need the trailing edge, and it is better than a persisted Event.
  • Loading branch information
mikelambert committed Dec 20, 2017
1 parent 99c598d commit 17998bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DateInput.jsx
Expand Up @@ -209,7 +209,7 @@ class DateInput extends React.Component {
ref={this.setInputRef}
value={value}
onChange={this.onChange}
onKeyDown={throttle(this.onKeyDown, 300)}
onKeyDown={throttle(this.onKeyDown, 300, {trailing: false})}
onFocus={onFocus}
placeholder={placeholder}
autoComplete="off"
Expand Down

0 comments on commit 17998bd

Please sign in to comment.