Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Commit

Permalink
core-input: typo + missing jsx props
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman Torjussen committed May 7, 2019
1 parent d371de0 commit 4566002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/core-input/core-input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class Input extends React.Component {
componentWillUnmount () {
this.el.removeEventListener('input.filter', this.onFilter)
this.el.removeEventListener('input.select', this.onSelect)
this.el.removeEventListener('input.beforeSend', this.onAjaxBeforeSend)
this.el.removeEventListener('input.ajax.beforeSend', this.onAjaxBeforeSend)
this.el.removeEventListener('input.ajax', this.onAjax)
}
render () {
Expand All @@ -45,6 +45,7 @@ Input.Highlight = ({ text, query = '' }) =>
Input.propTypes = {
onFilter: PropTypes.func,
onSelect: PropTypes.func,
onAjaxBeforeSend: PropTypes.func,
onAjax: PropTypes.func,
open: PropTypes.bool,
limit: PropTypes.number,
Expand Down
2 changes: 1 addition & 1 deletion packages/core-input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Hybrid solution; lazy load items, but let `core-input` still handle filtering:
}
document.addEventListener('focus', function (event) {
if (event.target.className.indexOf('my-input-lazy') === -1) return // Make sure we are on correct input
if (!event.target.className || event.target.className.indexOf('my-input-lazy') === -1) return // Make sure we are on correct input
event.target.className = '' // Prevent double execution
window.getCountries(function (items) {
Expand Down

0 comments on commit 4566002

Please sign in to comment.