From 4d61e2cb62a80c4ae74b7e5799b70998a2a2dfa8 Mon Sep 17 00:00:00 2001 From: Kowaio Date: Mon, 18 Mar 2019 13:57:55 +0100 Subject: [PATCH] fix createElement for rendering row --- src/SortableList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SortableList.js b/src/SortableList.js index be7d2d0..fc3e1d3 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, {Component, createElement} from 'react'; import PropTypes from 'prop-types'; import {ScrollView, View, StyleSheet, Platform, RefreshControl, ViewPropTypes} from 'react-native'; import {shallowEqual, swapArrayElements} from './utils'; @@ -267,7 +267,7 @@ export default class SortableList extends Component { onRelease={this._onReleaseRow.bind(this, key)} onMove={this._onMoveRow} manuallyActivateRows={this.props.manuallyActivateRows}> - {renderRow({ + {createElement(renderRow, { key, data: data[key], disabled: !sortingEnabled,