All Projects → ffrm → react-native-modal-select-list

ffrm / react-native-modal-select-list

Licence: other
☝️ React Native modal component to select options from list

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-modal-select-list

Autocomplete
🔮 Fast and full-featured autocomplete library
Stars: ✭ 1,268 (+3070%)
Mutual labels:  select, modal
Vxe Table
🐬 vxe-table vue 表格解决方案
Stars: ✭ 4,242 (+10505%)
Mutual labels:  select, modal
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (+150%)
Mutual labels:  select, modal
React Native Modal Dropdown
A react-native dropdown/picker/selector component for both Android & iOS.
Stars: ✭ 1,103 (+2657.5%)
Mutual labels:  select, modal
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+5832.5%)
Mutual labels:  select, modal
react-accessible-modal
Accessible modal dialog component for React
Stars: ✭ 17 (-57.5%)
Mutual labels:  modal
linq
A familiar set of functions that operate on JavaScript iterables (ES2015+) in a similar way to .NET's LINQ does with enumerables.
Stars: ✭ 39 (-2.5%)
Mutual labels:  select
react-native-select-multiple
☑️ A customiseable FlatList that allows you to select multiple rows
Stars: ✭ 155 (+287.5%)
Mutual labels:  select
JHTAlertController
A custom iOS alert that replaces the stock UIAlertController. Easily style the alert to match your app. Written in Swift for iOS.
Stars: ✭ 58 (+45%)
Mutual labels:  modal
react-modal
React Modal component
Stars: ✭ 18 (-55%)
Mutual labels:  modal
react-fusionui
☢️ Nuclear power-up for your UI.
Stars: ✭ 13 (-67.5%)
Mutual labels:  modal
select
Vue-based selsect component
Stars: ✭ 14 (-65%)
Mutual labels:  select
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-7.5%)
Mutual labels:  select
nhn next gameserver lab 2017 chatServer
NHN Next의 2017년 게임서버 과정 수업에 사용할 채팅 서버. select 기반
Stars: ✭ 32 (-20%)
Mutual labels:  select
ionic-selectable-demo
Ionic SelectSearchable Demo.
Stars: ✭ 22 (-45%)
Mutual labels:  select
modaltor
modal component for vuejs
Stars: ✭ 82 (+105%)
Mutual labels:  modal
react-native-ios-modal
A react-native component for displaying a modal on iOS by natively wrapping a react-native view inside a UIViewController and presenting it.
Stars: ✭ 94 (+135%)
Mutual labels:  modal
svelte-accessible-dialog
An accessible dialog component for Svelte apps
Stars: ✭ 24 (-40%)
Mutual labels:  modal
jquery.dialog.js
A lightweight replacement for the browser's default dialog boxes.
Stars: ✭ 17 (-57.5%)
Mutual labels:  modal
Algorithms
Java implementation for Introduction to Algorithms book.
Stars: ✭ 58 (+45%)
Mutual labels:  select

React Native Modal Select List

npm npm

React Native modal component to select options from list

Usage

import {
  ModalSelectList,
} from 'react-native-modal-select-list';

const App = () => {
  let modalRef;
  const openModal = () => modalRef.show();
  const saveModalRef = ref => modalRef = ref;
  const onSelectedOption = value => {
    console.log(`You selected: ${value}`);
  };
  return (
    <Fragment>
      <SafeAreaView style={styles.container}>
        <Button title="Open Modal" onPress={openModal} />
      </SafeAreaView>
      <ModalSelectList
        ref={saveModalRef}
        placeholder={"Text something..."}
        closeButtonText={"Close"}
        options={staticModalOptions}
        onSelectedOption={onSelectedOption}
        disableTextSearch={false}
        provider={modalOptionsProvider}
        numberOfLines={3}
      />
    </Fragment>
  );
};

Props

Name Type Description
placeholder String Placeholder text that will be displayed in the header text input
closeButtonText String Text for the modal close button
closeButtonComponent Component Component for the modal close button (i.e : Svg Icon, Image...)
onSelectedOption Function Callback that will receive the option value defined in the option definition object. Will be called when user selects one of the rows.
onClosedModal Function Callback that will be called if the user closes the modal without a selection.
disableTextSearch Boolean If must not display the header text input
options*** Array[Object] Options is an array with static objects to be displayed in the list. Each option object must have a label (to display in the list), and a value which will be returned to the parent component on selection.
provider Function Provider is a custom function that can be used to fetch any async data. The function can return a promise. The returned value from that function must be in the same format as the options array above.
pageSize Number Number of rows returned by every page request of the provider.
inputName String The key where the value of the header input text will be stored in the filter object that is passed down to the provider function.
filter Object/Function Filter is a object(or function that returns a object) that represents all the conditional values to be used by the provider function when it make the data requests.
headerTintColor String Custom color for header background
buttonTextColor String Custom color for header text labels
numberOfLines Number Maximum number of lines to display for row text

Options object format

The options (from the static list or from the resolver returned value) must be an object containing the following key definitions:

Key Type Description
label String Text to be displayed on the row.
value Any The value that will be returned when the user selects the row.

Static options filtering

When provider function is not defined and the component prefers to use the static options array, if the user edit the header input text value it will automatically filter the static options array looking for the input text in the middle of the options label(s) string.

Methods

Name Description
show Shows the select list and wait until the onSelectedOption callback is called to close it.
dismiss Manually dismiss the select list.

Examples

See the examples/RNModalSelectListPlayground app and play with it.

react-native-modal-select-list-example

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].