Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .scripts/post-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ function createPackageFile() {
JSON.parse(packageData)
);

// The dist folder is published as the package root, so "main" must point to
// the entry file relative to dist, not to the source tree.
packageJSON.main = "./index.js";
Comment thread
abhijithsheheer marked this conversation as resolved.

return fse.writeFile(
`./${BUILD_FOLDER}/package.json`,
JSON.stringify(packageJSON, null, 2),
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
]
},
"peerDependencies": {
"@shopify/flash-list": ">=2.3.1",
Comment thread
abhijithsheheer marked this conversation as resolved.
"react-native-device-info": "^10.3.0",
"react-native-reanimated": ">=3.6.0",
"react-native-safe-area-context": ">=3.3.2",
Expand All @@ -47,7 +48,6 @@
},
"dependencies": {
"@bigbinary/neeto-icons-rn": "^1.0.7",
"@shopify/flash-list": "^1.2.0",
"@styled-system/prop-types": "^5.1.5",
"dayjs": "^1.11.4",
"node-html-parser": "^6.1.5",
Expand Down Expand Up @@ -79,6 +79,7 @@
"@react-navigation/bottom-tabs": "^6.3.2",
"@react-navigation/material-top-tabs": "^6.2.2",
"@react-navigation/native": "^6.0.11",
"@shopify/flash-list": "^2.3.1",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-controls": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
Expand Down
15 changes: 12 additions & 3 deletions src/components/FlashList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,21 @@ const FadeInFlatList = React.forwardRef(
item: PropTypes.object,
};

const renderItem = item =>
isLoading || item.index < props.placeHolderItemCount ? (
<Item item={item} />
const shouldAnimate = animationDuration > 0;

const renderItem = item => {
if (isLoading || item.index < props.placeHolderItemCount) {
return <Item item={item} />;
}
Comment thread
abhijithsheheer marked this conversation as resolved.

return shouldAnimate ? (
<FadeInComponent index={item.index}>
{originalRenderItem(item)}
</FadeInComponent>
) : (
originalRenderItem(item)
);
};
Comment thread
abhijithsheheer marked this conversation as resolved.

useEffect(() => {
value.value = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const SearchBar = ({
}}
{...searchbarProps}
/>
{showCancelButton && searchText.length > 0 && (
{showCancelButton && (
Comment thread
abhijithsheheer marked this conversation as resolved.
<Container>
<Touchable
flexGrow={1}
Expand Down
18 changes: 5 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2242,13 +2242,10 @@
dependencies:
nanoid "^3.1.23"

"@shopify/flash-list@^1.2.0":
version "1.6.3"
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-1.6.3.tgz#463dc1703815bf916f8173afc22c852bf26337ad"
integrity sha512-XM2iu4CeD9SOEUxaGG3UkxfUxGPWG9yacga1yQSgskAjUsRDFTsD3y4Dyon9n8MfDwgrRpEwuijd+7NeQQoWaQ==
dependencies:
recyclerlistview "4.2.0"
tslib "2.4.0"
"@shopify/flash-list@^2.3.1":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-2.3.2.tgz#d96a00f2195629b070117f1eaabc12f8b25be8f1"
integrity sha512-vQnd0y0Ag11yzS30llaeCrtIU3xYTMe7KEOP3dveLImnVjQEUw6BEg1+Ztja6aODlVNz1BpvxtlQ5eZGxiLwKw==

"@sideway/address@^4.1.3":
version "4.1.4"
Expand Down Expand Up @@ -14591,7 +14588,7 @@ rechoir@^0.7.0:
dependencies:
resolve "^1.9.0"

recyclerlistview@4.2.0, recyclerlistview@^4.0.0:
recyclerlistview@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/recyclerlistview/-/recyclerlistview-4.2.0.tgz#a140149aaa470c9787a1426452651934240d69ef"
integrity sha512-uuBCi0c+ggqHKwrzPX4Z/mJOzsBbjZEAwGGmlwpD/sD7raXixdAbdJ6BTcAmuWG50Cg4ru9p12M94Njwhr/27A==
Expand Down Expand Up @@ -16520,11 +16517,6 @@ tsconfig-paths@^3.14.2:
minimist "^1.2.6"
strip-bom "^3.0.0"

tslib@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==

tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
Expand Down
Loading