Skip to content

Commit

Permalink
Add onBlur default in PhotoIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
earlyriser committed Dec 2, 2019
1 parent c78ab07 commit 2096d24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/components/photo/iterator.js
Expand Up @@ -5,7 +5,7 @@ const { Iterator } = require('../iterator')
const { DropTarget, NativeTypes } = require('../dnd')
const { DND, IMAGE } = require('../../constants')
const { isImageSupported } = IMAGE
const { blank, last, move } = require('../../common/util')
const { blank, last, move, noop } = require('../../common/util')
const { ceil, floor, min } = Math
const { on, off } = require('../../dom')

Expand Down Expand Up @@ -326,6 +326,11 @@ class PhotoIterator extends Iterator {
onSort: func.isRequired,
onSelectionSort: func.isRequired
}

static defaultProps = {
...Iterator.defaultProps,
onBlur: noop
}
}

const DropTargetSpec = {
Expand Down
2 changes: 0 additions & 2 deletions test/components/photo/list_test.js
Expand Up @@ -2,7 +2,6 @@

const React = require('react')
const { render, inWindowContext } = require('../../support/react')
const { noop } = __require('common/util')
let { PhotoList } = __require('components/photo/list')

const PHOTO = {
Expand All @@ -18,7 +17,6 @@ describe('PhotoList', () => {
beforeEach(() => {
props = {
expanded: [],
onBlur: noop,
photos: []
}
})
Expand Down

0 comments on commit 2096d24

Please sign in to comment.