olayinkaokewale / react-native-select-picker Goto Github PK
View Code? Open in Web Editor NEWCustomized select picker (just like <select> in html) that renders the same on iOS and Android
License: MIT License
Customized select picker (just like <select> in html) that renders the same on iOS and Android
License: MIT License
Is there any plans to add support for multiple select options?
When having an<SelectPicker.Item
with the value null
and and parsing a value 0
as value in one of the other fields the Item with the null value is being selected
<SelectPicker
selected={0}
>
<SelectPicker.Item label="Select none" value={null} /> /* THIS WILL VE SELECTED */
<SelectPicker.Item label="option #1" value={0} />
<SelectPicker.Item label="option #2" value={1} />
<SelectPicker.Item label="option #3" value={2} />
</SelectPicker>
When parsing any as selected
the Item with the value matching the value of selected should be picked.
Eg:
selected={0}
should select the item with the value={0}
selected={1}
should select the item with the value={1}
selected={null}
should select the item with the value={null}
As a temporary solution i moved the Select none
to the bottom of the list
I don't know if this is some implementation detail but when having a <SelectPicker>
with default value selected
equal to zero, the corresponding item is not automatically selected. This is not happening for other values.
<SelectPicker
selected={0}
>
<SelectPicker.Item label="option #1" value={0} /> // It is not being selected automatically
<SelectPicker.Item label="option #2" value={1} />
<SelectPicker.Item label="option #3" value={2} />
</SelectPicker>
When it is set to zero, it should select the corresponding item
My solution for now is to use selected
with a default value being a string and for some reason that works.
Hi,
In our app we have several forms. These are built using the native TextInput component, react-native-date-picker and this package.
Other then the other components, this component seems to not support dark mode (at least for iOS) and the picker remains light even if dark mode is active.
Below is an example of the date picker component with dark mode enabled:
Or is there something (a property) I am missing? If not, are there any plans to support dark mode in the future?
Kind regard,
Geert van Soest
I am trying to set the key
property for SelecPicker.Item
as in the example but got the following warning:
Checking out the code, as expected, there is no key
props attribute so that's why the error is triggered.
When setting a key for the SelectPicker.Item
, no warning should appear.
I tried creating a React.Fragment
enclosing the SelectPicker.Item
but it doesn't show as an option anymore. Therefore it appears that there is no current solution.
how can fix it?
Hi,
I tried the plugin but I'm getting:
Invariant Violation: Tried to register two views with the same name RNCAndroidDropdownPicker
"react-native": "0.63.4",
"react-native-form-select-picker": "0.0.10",
Edit:
Resolved, the issue was related to some deprecated import in the plugin core.
Solution:
Edit node_modules\react-native-form-select-picker\src\index.js and node_modules\react-native-form-select-picker\src\components\picketitem-native.js
replace:
import { Picker } from '@react-native-community/picker';
by
import { Picker } from '@react-native-picker/picker';
you can edit the package.json too
When the IOS device is on landscape mode, picker is not working correctly.
My app was messed up after updating the version to 62.2. And I found this package which is really great and helped me to save time on this.
Thank you for all the work you have done for this.
I'm just wondering if there's an option to disable default placeholder? I set default value instead of this placeholder so don't' want to list default placeholder as an option.
e.g:
------select-----
option1
option2
option3
TO
option1
option2
option3
Please advise.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.