ui-ninja / react-native-rating-element

A simple rating library for react native supporting: decimal points, direction aware icons, custom icon set from Ionicons, custom images and record rating given by users.
MIT License
25 stars 5 forks source link

Bug: column-reverse not working properly #25

Closed pROFESOR11 closed 3 years ago

pROFESOR11 commented 3 years ago

Hi, It works well with direction="column", but when direction is set to column-reverse, the views are not aligned and coloredIcons are not drawn from bottom to up.

<Rating
        rated={0.5}
        totalCount={1}
        ratingColor="#f1c644"
        ratingBackgroundColor="#d4d4d4"
        size={100}
        readonly
        icon="ios-star"
        direction="column" // direction="column-reverse"
      />
direction="column" direction="column-reverse"
image image
ui-ninja commented 3 years ago

@pROFESOR11 Strange. Demo folder has example which uses the "column-reverse" and it works fine. Can you share parent wrapper code as well?

pROFESOR11 commented 3 years ago

@ui-ninja Here you are:

export default function App() {
  return (
    <View style={styles.container}>
      <Rating
        rated={0.5}
        totalCount={1}
        ratingColor="#f1c644"
        ratingBackgroundColor="#d4d4d4"
        size={100}
        readonly // by default is false
        icon="ios-star"
        direction="column-reverse" // anyOf["row" (default), "row-reverse", "column", "column-reverse"]
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

I've also created a snack: https://snack.expo.io/@profesor/smart-orange

ui-ninja commented 3 years ago

Well this is what i see on snack shared.. looks fine to me

image

pROFESOR11 commented 3 years ago

@ui-ninja Could you try on iOS?

ui-ninja commented 3 years ago

ah! I see the issue now. Will fix and release minor patch soon

ui-ninja commented 3 years ago

@pROFESOR11 released a new version https://github.com/ui-ninja/react-native-rating-element/releases/tag/5.4.0 update the pkg and see if it resolves the bug? Reopen if it doesn't fix.