Skip to content

Commit e2718e2

Browse files
committed
Update noDataFoundText
1 parent d370b53 commit e2718e2

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"react": "16.13.1",
1313
"react-native": "0.63.4",
14-
"react-native-actions-sheet": "^0.6.1",
14+
"react-native-actions-sheet": "^0.3.0",
1515
"react-native-gesture-handler": "^2.4.2"
1616
},
1717
"devDependencies": {

example/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,10 +3552,10 @@ react-is@^16.12.0, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.4:
35523552
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
35533553
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
35543554

3555-
react-native-actions-sheet@^0.6.1:
3556-
version "0.6.1"
3557-
resolved "https://registry.yarnpkg.com/react-native-actions-sheet/-/react-native-actions-sheet-0.6.1.tgz#ccfa2e3d717c9c44d7d51fc084876324bee0e8d0"
3558-
integrity sha512-cBDw1nVrgV9Wluonb/r3pXKxjN2Wm6iGs+DjlAoHoGQj0pD6QR2aLrXyO30334pjWnJE4oMRFv8G02PM8ikdNg==
3555+
react-native-actions-sheet@^0.3.0:
3556+
version "0.3.5"
3557+
resolved "https://registry.yarnpkg.com/react-native-actions-sheet/-/react-native-actions-sheet-0.3.5.tgz#7e91a7a5598e396a7ea3de223291a94a0fcb5b32"
3558+
integrity sha512-m777kTyNLADV3hF0wCT43LTWeIPS4ZHC5Gd5+8WQ6OD1u6U44AXpmYXpBfn6ji7dq70a3Is+Dh9SkzmmVK++JQ==
35593559

35603560
react-native-gesture-handler@^2.4.2:
35613561
version "2.4.2"

src/components/Picker.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,22 @@ export const Picker = <T,>({
161161
) : null}
162162
</View>
163163
}
164-
ListEmptyComponent={
165-
<View
166-
style={{
167-
flex: 1,
168-
alignItems: 'center',
169-
paddingTop: 20,
170-
}}
171-
>
172-
<Text>{noDataFoundText}</Text>
173-
</View>
174-
}
164+
ListEmptyComponent={() => {
165+
if (!loading) {
166+
return (
167+
<View
168+
style={{
169+
flex: 1,
170+
alignItems: 'center',
171+
paddingTop: 20,
172+
}}
173+
>
174+
<Text>{noDataFoundText}</Text>
175+
</View>
176+
);
177+
}
178+
return null;
179+
}}
175180
ref={scrollViewRef}
176181
nestedScrollEnabled={true}
177182
data={data}

0 commit comments

Comments
 (0)