Git Product home page Git Product logo

react-native-select-multiple's People

Contributors

alanshaw avatar andrebr avatar dependabot[bot] avatar fazeelzama20 avatar fedor-t avatar mnaveeds avatar pooler22 avatar richsilv avatar tobbb avatar tunvirrahman avatar vikrantnegi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-select-multiple's Issues

Set max number of selected items

It would be a nice if there's an optional prop to specify maximum number of items that can be selected. I don't know if there's a workaround for this (if so i'd be glad to hear about it, need it for a project ASAP).

Maintenance status?

@alanshaw First, thank you very much for creating this library.

Is this currently maintained? It's a rather small package so easy enough to fork, but it would also be "good" to reduce forking if possible. I'm using this extensively in a react native app of mine and would love to help work through the open PRs and issues, if you need help.

Thanks again.

selectedItems returns an object of undefined objects

Screenshot (15)
Check box doesn't tick when I click on it. I decided to console.log(selectedItems) and anytime i click a checkbox for the first time, an array of a valid label and value is logged. But when I add another click, the first object re evaluates to undefined

Changing the color of the CHECK in the selected checkbox

my selectedCheckboxStyle is
{ width: 22, height: 22, borderWidth: 1, borderColor: "blue", backgroundColor: "blue", borderRadius: 4, color: "white", alignItems: "center", justifyContent: "center", },

everything is working fine, but the "check" in the checkbox is still the original color. Thanks.

Select all

How can we select all in this package? Thank you!

Invalid argument supplied to oneOfType, expected an instance of array

src/SelectMultiple.js : line 7, PropTypes.oneOfType - I believe should take in array.

I am receiving warning "Invalid argument supplied to oneOfType, expected an instance of array."

Fix would include square brackets like below -

const itemType = PropTypes.oneOfType([
PropTypes.string,
PropTypes.shape({ label: PropTypes.string, value: PropTypes.any })
])

Great Component, thanks :)

Warning: componentWillReceiveProps has been renamed RN0.64

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
"dependencies": {
    "react": "17.0.1",
    "react-native": "0.64.0",
    "react-native-select-multiple": "^2.1.0"
  },

Indexing in select multiple element

i want to get hte index value of selected item in select multiple and i have tried all the things like pass the index keyword in the function but its undefined

Warning: componentWillReceiveProps has been renamed, and is not recommended for use

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

  • Move data fetching code or side effects to componentDidUpdate.
  • If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
  • Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.

Please update the following components: %s, SelectMultiple

Styling of selected checkbox does nothing

Im trying to style my selected checkbox to be a certain color but when i add styling to selectedCheckboxStyle prop it does nothing. The color only changes when i style the checkboxStyle prop. The issue is i only need the color to change if it is selected not if its not selected. SO i think there might be an issue here with your code.

Checkbox not working in Real Device

If I compile my application on an android emulator everything is working as expected. However, If I compile my application on a real device, the checkbox is not working... The labels show up but not the actual checkbox so I can't select anything. Is anyone having this problem or it's just me?
Btw, my real device has an Android version of 5.1 (API 22) and my emulator has an API level of 23.

version 2.0.0 not rendering list

I am using RN version 0.58.5, and recently installed version 2.0.0 of this package, but cannot get the list rendered,
I have followed the documentation, the previous version works fine, but the version 2.0.0 doesn't show anything.
any suggestion on what i am doing wrong,

          <SelectMultiple
            items={this.state.sample}
            selectedItems={this.state.selectedItems}
            onSelectionsChange={this.onSelectionsChange}
          />

and the dataset is in the label,value type like so,

        sample: [
           { label: "Item 1", value: 1 },
           { label: "Item 2", value: 2 },
         ],

Selections not scrolling on Android (Pixel 2 XL, 3, 3 XL)

The list will render with all possible selections but does not allow the user to scroll through the options when viewed on an Android device (tested with Pixel 2 XL, Pixel 3, Pixel 3 XL). Scrolling works on iOS without issues. Here's a glance at our code:

<View
    style={{
        height: 150,
        borderWidth: 1,
        borderColor: "#e1e8ee",
        margin: 5
     }}>
    <SelectMultiple
       keyExtractor={(item, index) => index.toString()}
       items={this.state.audData[0]}
       selectedItems={this.state.selectedAud}
       onSelectionsChange={this.handleChange}
    />
</View>

Any advice?

TypeError: Cannot read property 'oneOfType' of undefined

Please change PropTypes from the react component with the PropTypes from the prop-types component to support React 15.5 or higher.

import React, { Component } from 'react';
import PropTypes from 'prop-types';

TypeError: Cannot read property 'oneOfType' of undefined
at Object. (node_modules/react-native-select-multiple/src/SelectMultiple.js:7:30)

Wrong "onSelectionsChange" argument

From the docs, the first arguemnt of the method onSelectionsChange should be a list of the selected items as follows:

[
  {
    label: 'car',
    value: 'car-item-id'
  },
  {
    label: 'bike',
    value: 'bike-item-id'
  }
]

But instead I'm getting:

[
  {
    label: 'car',
    value: 'car-item-id'
  },
  {
    label: 'bike',
    value: 'bike-item-id',
    selected: false // <<< Notice
  }
]

No renderFooter prop option

Hey, i have a list which is long and i cant render a button at the bottom because there is no option to add renderFooter prop.

selectedRowStyle not effect the Text Color !!

first :thanks for your component 👍
when in want style my row with selectedRowStyle={{backgroundColor:'gray'}} it's OK
but when try to

selectedRowStyle={{backgroundColor:'gray',color:'red'}}

it doesn't effect the row color

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.