Comments (11)
@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.
@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.
just to let you know all good, thanks again
from react-native-modal-dropdown.
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.
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.
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.
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.
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.
here's quick snap of what i was referring to.
from react-native-modal-dropdown.
@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.
yes its 0.37. ok ill give that a try thanks
from react-native-modal-dropdown.
Related Issues (20)
- Fork with latest PR's merged HOT 2
- is it possible to add the icon on the right of the default value? HOT 4
- Freeze Android HOT 1
- Any possibility to detect onReachEnd options? HOT 1
- This project is working but seems outdated. Which fork to use? HOT 26
- Search bar feature HOT 1
- New Feature : Display selected Item in the Modal as it is in renderItem HOT 2
- a error in the react native 0.63 HOT 11
- Handle Press Error ModalDropdown HOT 1
- Is this library no longer maintained ? HOT 4
- zIndex visibility problem HOT 1
- filter not work without schroll
- Passing props to the rendered FlatList instance
- Getting Scroll to index error HOT 3
- on change of options how can I rerender renderButtonText and empty it's value inside dropdown?
- Error on web HOT 4
- app crashed when press on dropDownmodal HOT 4
- renderButtonComponent or renderRightComponent does not exist in ModalDropdownProps in latest version HOT 1
- How can i use methods show and hidden?
- Z index issue of the dropdown if placed in a view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-modal-dropdown.