react-native-grid-list
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "react-native-grid-list", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -25,3 +25,3 @@ import React, { PureComponent } from 'react'; | ||
const { data } = props; | ||
if (!props[propName] && data && data.length === 0) { | ||
if (!props[propName] && !data) { | ||
return new Error('Invalid props, `data` or `children` is required'); | ||
@@ -38,2 +38,3 @@ } | ||
numColumns: 3, | ||
data: [], | ||
itemStyle: {}, | ||
@@ -40,0 +41,0 @@ showSeparator: false, |
@@ -20,2 +20,12 @@ import { shallow } from 'enzyme'; | ||
}); | ||
it('renders empty list', () => { | ||
const wrapper = shallow( | ||
<GridList | ||
data={[]} | ||
renderItem={({ item }) => <Image source={item.thumbnail} />} | ||
/>, | ||
); | ||
expect(wrapper).toMatchSnapshot(); | ||
}); | ||
@@ -22,0 +32,0 @@ it('renders showSeparator', () => { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1057646
340