Skip to content
Open
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
6 changes: 3 additions & 3 deletions app/examples/flashlist.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useCallback} from 'react';
import {Text, View} from 'react-native';
import ActionSheet from 'react-native-actions-sheet';
import {FlashList} from 'react-native-actions-sheet/dist/src/views/FlashList';
import ActionSheet, { ScrollView } from 'react-native-actions-sheet';
import {FlashList} from '@shopify/flash-list';

function FlashListSheet() {
const vegetableNamesWithEmoji = [
Expand Down Expand Up @@ -101,7 +101,7 @@ function FlashListSheet() {
}}>
<FlashList
data={vegetableNamesWithEmoji}
estimatedItemSize={40}
renderScrollComponent={ScrollView}
ListHeaderComponent={
<Text
style={{
Expand Down
1 change: 0 additions & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"esModuleInterop": true,
"paths": {
"react-native-actions-sheet": ["../"],
"react-native-actions-sheet/dist/src/views/FlashList": ["../dist/src/views/FlashList"],
"react-native-safe-area-context": ["../example/node_modules/react-native-safe-area-context"]
}
}
Expand Down
424 changes: 212 additions & 212 deletions example/package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"esModuleInterop": true,
"paths": {
"react-native-actions-sheet": ["../"],
"react-native-actions-sheet/dist/src/views/FlashList": ["../dist/src/views/FlashList"]
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-actions-sheet",
"version": "10.0.0-alpha.1",
"version": "10.0.0-alpha.2",
"description": "A Cross Platform(Android & iOS) ActionSheet with a robust and flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
8 changes: 3 additions & 5 deletions src/hooks/use-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ export const useRouter = ({
return [...nextStack, {...next, params: params || next.params}];
}
onNavigate?.(next.name);
animate(0, 1, 150);
return [...state, {...next, params: params || next.params}];
});
setTimeout(() => animate(0, 1, 150));
}, 100);
},
[animate, routes, onNavigate],
Expand Down Expand Up @@ -148,7 +148,6 @@ export const useRouter = ({
const next = routes?.find(route => route.name === name);
if (state.length === 1) {
close();
animate(0, 1);
return state;
}

Expand All @@ -157,7 +156,6 @@ export const useRouter = ({
nextStack.pop();
if (currentRoute) {
onNavigateBack?.(nextStack[nextStack.length - 1]?.name);
animate(0, 1, 150);
}
return nextStack;
}
Expand All @@ -166,13 +164,13 @@ export const useRouter = ({
const nextStack = [...state];
nextStack.splice(currentIndex);
onNavigateBack?.(nextStack[nextStack.length - 1]?.name);
animate(0, 1, 150);
return [...nextStack, next];
}
animate(0, 1, 150);

onNavigateBack?.(next.name);
return [...stack, next];
});
setTimeout(() => animate(0, 1, 150));
}, 100);
};

Expand Down
Loading