Comments (4)
McPicker
is currently setup to know the data set before being shown. If the data set changes once McPicker is visible there is no way to reloadData()
. You would have to dismiss McPicker and show
it again with the new data.
Is there a reason you can't load from firebase before show
ing McPicker? Could you elaborate your use-case a little more? ie. Selection of something in component 0 causes data to change in component 1?
from mcpicker-ios.
No response, closing.
from mcpicker-ios.
@kmcgill88 I'm creating a custom date picker with an option to select a year or not (hence custom solution vs the native date picker). I'd like to update the 2nd column of dates based on the month and year selected, hence the need for something that reloads the second column list. Any idea on how to achieve this? Thank you.
from mcpicker-ios.
If anybody is trying to solve the same problem in the future, I solved this by setting a new index for the day using "pickerSelectRowsForComponents".
For example, when the user picks "Feb" and "31", I set the second column index to the max possible day for the February for a given year (or fallback to 1804 or something). Using animation, user will see that they cannot select Feb 31st, vs refreshing entire list.
from mcpicker-ios.
Related Issues (20)
- Fix tests for Swift 4.2 HOT 1
- viewForRow is not called HOT 1
- Add Apps Using McPicker to README
- Swift 5 version update? HOT 3
- Is there a way to get the selected row or index, besides the text HOT 1
- Number of items per selection issue
- Is there a way to use McPicker as a DatePicker? HOT 2
- i cant find the way to config my title. QAQ
- Separator Line HOT 3
- How can I make my McPickerView Multiline in swift?
- Why was tap on Popup View removed? Is there a way to add it back? HOT 4
- Use of unresolved identifier 'mcTextField'
- how can add typeface for texts?
- get selected index HOT 1
- Barbuttons are not showing up
- Item not changing when quick select
- Is there a way to customise the columns width?
- Xcode 12 build errors HOT 8
- Find index after selecting particular value
- trouble with AppCenter HOT 1
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 mcpicker-ios.