prscX / react-native-bottom-action-sheet

React Native: Native Bottom Action Sheet
Apache License 2.0
634 stars 48 forks source link

iOS GridView Chinese characters #21

Closed rheng001 closed 6 years ago

rheng001 commented 6 years ago

Hi, this is a great library!

I have a slight issue when showing a GridView on an ios simulator/device. My GridView displays just as I want but there is some strange chinese characters on the bottom of the view. Is there any way I can remove these? Its random and out of place. On my android device/emulator it doesnt display any chinese characters and works fine.

Also the chinese text button below is messing up my items array. I have 8 objects in the array,

items: [
        { title: "Food", icon: "food_icon.png" },
        { title: "Coffee Shops", icon: "coffee_icons.png" },
        { title: "Markets", icon: "market_icons.png" },
        { title: "Bus Stops", icon: "busstop_icons.png" },
        { title: "Libraries", icon: "libraries_icons.png" },
        { title: "Buildings", icon: "building_icons.png" },
        { title: "Parking", icon: "parking_icons.png" },
        { title: "Food Trucks", icon: "foodtruck_icons.png" },

      ]

I have a switch case as follows for my 8 objects, starting at case 0 since arrays start at 0

 switch (selection) {
            case 0:
            case 1:
                 ....
                 ....
            case 7
}

However the chinese text button below actually counts as a selection item and when I alerted a message when I press on it says 0. This means that the first object in the array is actually the chinese text button. And when I click on my last object in my array I initialized(this case Food Trucks) it goes out of bounds and gives me an error since the selection is technically considered as (selection === 8)

bottom

prscX commented 6 years ago

Thanks @rheng001 for raising the issue.

I will look into this today and will push a new release with the fix.

Thanks </ Pranav >

prscX commented 6 years ago

Hi @rheng001, I have made the required changes in the native library. Can you please verify by installing the library again. Please let me know incase you still face the same issue.

On the other note, when I am invoking Grid Alert it is giving me below layout, can you please share any fix you have made to the library:

screen shot 2018-07-18 at 2 52 53 pm

Thanks </ Pranav

rheng001 commented 6 years ago

Hi @prscX

I tried installing the library again and there were no changes. I was looking through the recent commits and saw that there was no new commits regarding this change. I also looked on the npm site to see if the library verison was changed but its still the same.

Is this change live for me to download? How would I go about installing the new changes?

Thanks

prscX commented 6 years ago

Hi @rheng001: My bad, I forgot to mention the fix is done in the native library prscX/SGActionView - COMMIT. In order to upgrade this library there are two ways of doing it:

node_modules/react-native-bottom-action-sheet/ios/

Thanks </ Pranav >