Code Monkey home page Code Monkey logo

Comments (11)

sohobloo avatar sohobloo commented on July 29, 2024 1

@ajonno
I've already considered your situation. Please see #11 and wait for my release v0.4.0, and then you can render your option rows with renderRow function and use TouchableHighlight component with the overlayColor you like.

By the way, at present, you can still render your rows without wrapping any Touchable component, and give a backgroundColor to the row component. This will workaround one small mistake made by my default renderRow function which causes the black highlight when user tap the row (If you are facing this situation which lead to this topic.)

Oh, forgot to mention, the feature has already submitted to the Dev branch on Github. Have a try?

Hope you can understand my poor Chinglish. :-)

from react-native-modal-dropdown.

sohobloo avatar sohobloo commented on July 29, 2024 1

@ajonno
Here are the sample codes:
Line 82 gives a defaultValue maintained by the state to the dropdown.
Line 144 You can change the state of defaultValue at the right time. Considering your requirement, I think it is onSelect.

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024 1

just to let you know all good, thanks again

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024

hey thanks for quick reply. your english is perfect (wish i could speak mandarin! :-). im in middle of big project at moment so not sure ill have time today to test, but am happy to wait for 0.4.0. when do you think it will be ready to release ?

from react-native-modal-dropdown.

sohobloo avatar sohobloo commented on July 29, 2024

@ajonno

when do you think it will be ready to release ?
I have one more feature to complete before v0.4.0 formal release. I wish I can finish it on this Saturday.
But, I can draft a v0.4.0-rc1 for you.

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024

great thanks! its ok i can wait until next week.

one quick related question - lets say i have a drop down list where the choices are "Year 1", "Year 2", "Year 3" and the user taps on "Year 2". However I want to display the selected value, as "2".

I can see the onSelected method but wasn't sure how to then update the value(?) field so it would display as "2" and not "Year 2" ?

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024

oh and one more quick question - will the update mean that the ENTIRE row can now recognise and capture a tap event, since it will be using TouchableHighlight etc ?

from react-native-modal-dropdown.

sohobloo avatar sohobloo commented on July 29, 2024

oh and one more quick question - will the update mean that the ENTIRE row can now recognise and capture a tap event, since it will be using TouchableHighlight etc ?

I think the entire row can recognise and capture a tap event since my very first release. Sorry I do not understand what is your problem.

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024

here's quick snap of what i was referring to.
2016-12-02_15-02-31

from react-native-modal-dropdown.

sohobloo avatar sohobloo commented on July 29, 2024

@ajonno
Check your react-native version whether it's >= 0.36.0
If so, try update dropdown component to v0.4.0

from react-native-modal-dropdown.

ajonno avatar ajonno commented on July 29, 2024

yes its 0.37. ok ill give that a try thanks

from react-native-modal-dropdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.