Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Fix fuzzaldrin types
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 5, 2021
1 parent cf1cac7 commit d5d3736
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/select-list-view.ts
Expand Up @@ -232,7 +232,7 @@ export default class SelectListView {

if (this.visibilityObserver) {
etch.getScheduler().updateDocument(() => {
Array.from(this.refs.items.children).slice(this.props.initiallyVisibleItemCount).forEach(element => {
Array.from(this.refs.items.children).slice(this.props.initiallyVisibleItemCount).forEach((element: any) => {
this.visibilityObserver.observe(element)
})
})
Expand Down Expand Up @@ -316,6 +316,7 @@ export default class SelectListView {
this.listItems = null
if (this.visibilityObserver) this.visibilityObserver.disconnect()
const filterFn = this.props.filter || this.fuzzyFilter.bind(this)
// @ts-ignore fuzzaldrin types should be fixed
this.items = filterFn(this.props.items.slice(), this.getFilterQuery())
if (this.props.order) {
this.items.sort(this.props.order)
Expand All @@ -327,7 +328,7 @@ export default class SelectListView {
this.selectIndex(this.props.initialSelectionIndex, updateComponent)
}

fuzzyFilter (items: Array<object | string>, query?: string) {
fuzzyFilter (items: Array<string>, query?: string) {
if (query.length === 0) {
return items
} else {
Expand Down

0 comments on commit d5d3736

Please sign in to comment.