mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fixing cards filter
This commit is contained in:
parent
fec1f9e2cf
commit
8d7e88d12b
@ -28,7 +28,7 @@ export function Cards({ navigation, openContact, openRegistry, addChannel }) {
|
|||||||
)}
|
)}
|
||||||
<View style={styles.inputwrapper}>
|
<View style={styles.inputwrapper}>
|
||||||
<AntIcons style={styles.icon} name="search1" size={16} color={Colors.inputPlaceholder} />
|
<AntIcons style={styles.icon} name="search1" size={16} color={Colors.inputPlaceholder} />
|
||||||
<TextInput placeholder={ state.strings.contactFilter } placeholderTextColor={Colors.inputPlaceholder} value={state.filter}
|
<TextInput placeholder={ state.strings.contactFilter } placeholderTextColor={Colors.inputPlaceholder}
|
||||||
style={styles.inputfield} autoCapitalize={'none'} spellCheck={false} onChangeText={actions.setFilter} />
|
style={styles.inputfield} autoCapitalize={'none'} spellCheck={false} onChangeText={actions.setFilter} />
|
||||||
<View style={styles.space} />
|
<View style={styles.space} />
|
||||||
</View>
|
</View>
|
||||||
@ -40,7 +40,7 @@ export function Cards({ navigation, openContact, openRegistry, addChannel }) {
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [navigation]);
|
}, [navigation, state.sort]);
|
||||||
|
|
||||||
const call = async (contact) => {
|
const call = async (contact) => {
|
||||||
try {
|
try {
|
||||||
@ -57,6 +57,7 @@ export function Cards({ navigation, openContact, openRegistry, addChannel }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
|
{ !navigation && (
|
||||||
<View style={styles.title}>
|
<View style={styles.title}>
|
||||||
{ state.sort && (
|
{ state.sort && (
|
||||||
<TouchableOpacity style={styles.sort} onPress={() => actions.setSort(false)}>
|
<TouchableOpacity style={styles.sort} onPress={() => actions.setSort(false)}>
|
||||||
@ -79,7 +80,7 @@ export function Cards({ navigation, openContact, openRegistry, addChannel }) {
|
|||||||
<Text style={styles.newtext}>{ state.strings.add }</Text>
|
<Text style={styles.newtext}>{ state.strings.add }</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
)}
|
||||||
{ state.cards.length == 0 && (
|
{ state.cards.length == 0 && (
|
||||||
<View style={styles.notfound}>
|
<View style={styles.notfound}>
|
||||||
<Text style={styles.notfoundtext}>{ state.strings.noContacts }</Text>
|
<Text style={styles.notfoundtext}>{ state.strings.noContacts }</Text>
|
||||||
|
@ -111,6 +111,8 @@ export function useCards() {
|
|||||||
updateState({ filter });
|
updateState({ filter });
|
||||||
},
|
},
|
||||||
setSort: (sort) => {
|
setSort: (sort) => {
|
||||||
|
console.log("SETTTING : ", sort);
|
||||||
|
|
||||||
updateState({ sort });
|
updateState({ sort });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user