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#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 Aug 24, 2017
1 parent 4de2733 commit 4dfd0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DateInput.jsx
Expand Up @@ -173,7 +173,7 @@ export default 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 4dfd0dc

Please sign in to comment.