mirror of
https://github.com/status-im/rn-emoji-keyboard.git
synced 2025-02-04 12:23:28 +00:00
fix: android active indicator
This commit is contained in:
parent
935fe7009f
commit
f6f9d40647
@ -33,7 +33,6 @@ export const Categories = ({ flatListRef, scrollNav }: CategoriesProps) => {
|
||||
|
||||
const activeIndicator = React.useCallback(
|
||||
() => (
|
||||
// <Animated.View style={[styles.activeIndicator, { left: scrollNav }]} />
|
||||
<Animated.View
|
||||
style={[
|
||||
styles.activeIndicator,
|
||||
@ -58,6 +57,7 @@ export const Categories = ({ flatListRef, scrollNav }: CategoriesProps) => {
|
||||
horizontal={true}
|
||||
onScrollToIndexFailed={(e) => console.log(e)}
|
||||
ListHeaderComponent={activeIndicator}
|
||||
ListHeaderComponentStyle={styles.activeIndicatorContainer}
|
||||
extraData={ctx?.activeCategoryIndex}
|
||||
/>
|
||||
</View>
|
||||
@ -91,4 +91,9 @@ const styles = StyleSheet.create({
|
||||
backgroundColor: 'white',
|
||||
borderRadius: 6,
|
||||
},
|
||||
activeIndicatorContainer: {
|
||||
position: 'absolute',
|
||||
width: 28,
|
||||
height: 28,
|
||||
},
|
||||
});
|
||||
|
@ -30,10 +30,6 @@ export const EmojiCategory = ({ item }: { item: CategoryTypes }) => {
|
||||
const [empty, setEmpty] = React.useState<EmojiType[]>([]);
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log(
|
||||
numberOfColumns.current -
|
||||
(emojisByGroup[item].length % numberOfColumns.current)
|
||||
);
|
||||
const fillWithEmpty = new Array(
|
||||
numberOfColumns.current -
|
||||
(emojisByGroup[item].length % numberOfColumns.current)
|
||||
|
Loading…
x
Reference in New Issue
Block a user