mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
remove max children limitation on SwipeableQuickActions
Summary: **motivation** Right now `SwipeableQuickActions` only allows two actions. Let this limit be in the userland. cc fred2028 Closes https://github.com/facebook/react-native/pull/8528 Differential Revision: D4211729 Pulled By: ericvicenti fbshipit-source-id: 903592190b9855ffe9da44864cdc276bc1e18a7c
This commit is contained in:
parent
1c249e4804
commit
d21199595e
@ -27,8 +27,6 @@ const React = require('React');
|
|||||||
const StyleSheet = require('StyleSheet');
|
const StyleSheet = require('StyleSheet');
|
||||||
const View = require('View');
|
const View = require('View');
|
||||||
|
|
||||||
const MAX_QUICK_ACTIONS = 2;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A thin wrapper around standard quick action buttons that can, if the user
|
* A thin wrapper around standard quick action buttons that can, if the user
|
||||||
* chooses, be used with SwipeableListView. Sample usage is as follows, in the
|
* chooses, be used with SwipeableListView. Sample usage is as follows, in the
|
||||||
@ -53,7 +51,7 @@ class SwipeableQuickActions extends React.Component {
|
|||||||
|
|
||||||
// Multiple children
|
// Multiple children
|
||||||
if (children instanceof Array) {
|
if (children instanceof Array) {
|
||||||
for (let i = 0; i < children.length && i < MAX_QUICK_ACTIONS; i++) {
|
for (let i = 0; i < children.length; i++) {
|
||||||
buttons.push(children[i]);
|
buttons.push(children[i]);
|
||||||
|
|
||||||
// $FlowFixMe found when converting React.createClass to ES6
|
// $FlowFixMe found when converting React.createClass to ES6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user