Skip to content

Commit

Permalink
Release 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Dec 8, 2021
1 parent 63e773b commit 058642f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ module.exports = {
arrowParens: 'always',
singleQuote: true,
jsxSingleQuote: false,
jsxBracketSameLine: true,
bracketSpacing: false,
};
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.4

Small internal lint fixes.


## 1.1.3

Layout styling fixes [#23](https://github.com/hyochan/react-native-masonry-list/pull/23)
Expand Down
1 change: 0 additions & 1 deletion RNMasonryExample/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ module.exports = {
arrowParens: "always",
singleQuote: true,
jsxSingleQuote: false,
jsxBracketSameLine: true,
bracketSpacing: false,
};
3 changes: 2 additions & 1 deletion RNMasonryExample/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ const FurnitureCard: FC<{item: Furniture}> = ({item}) => {
<Text
style={{
marginTop: 8,
}}>
}}
>
{item.text}
</Text>
</View>
Expand Down
9 changes: 6 additions & 3 deletions index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function MasonryList<T>(props: Props<T>): ReactElement {
onScroll={({nativeEvent}: {nativeEvent: NativeScrollEvent}) => {
if (isCloseToBottom(nativeEvent, onEndReachedThreshold || 0.1))
onEndReached?.();
}}>
}}
>
<View style={ListHeaderComponentStyle}>{ListHeaderComponent}</View>
{data.length === 0 && ListEmptyComponent ? (
React.isValidElement(ListEmptyComponent) ? (
Expand All @@ -107,15 +108,17 @@ function MasonryList<T>(props: Props<T>): ReactElement {
flexDirection: horizontal ? 'column' : 'row',
},
style,
]}>
]}
>
{Array.from(Array(numColumns), (_, num) => {
return (
<View
key={`${keyPrefix}-${num.toString()}`}
style={{
flex: 1 / numColumns,
flexDirection: horizontal ? 'row' : 'column',
}}>
}}
>
{data
.map((el, i) => {
if (i % numColumns === num)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@react-native-seoul/masonry-list",
"version": "1.1.3",
"version": "1.1.4",
"description": "React Native Masonry List for Pinterest like UI implemented just like the [FlatList].",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"postinstall": "dooboolab-welcome postinstall",
"postinstall": "npx dooboolab-welcome postinstall",
"scripts": {
"lint": "eslint . --ext .ts,.tsx,.js,.jsx",
"build": "rm -rf ./lib && tsc && flowgen lib/index.d.ts -o lib/index.js.flow",
Expand Down

0 comments on commit 058642f

Please sign in to comment.