Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix prop-types for react native 0.49 #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SortableCell.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {
PropTypes,
Component,
} from 'react'
import PropTypes from 'prop-types';
import {
View, Text,
StyleSheet,
Expand Down
7 changes: 6 additions & 1 deletion SortableSudokuGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*/

import React, {
PropTypes,
Component,
} from 'react'
import PropTypes from 'prop-types';
import {
View,
StyleSheet,
Expand Down Expand Up @@ -51,6 +51,7 @@ class SortableSudokuGrid extends Component {
dataSource: PropTypes.array.isRequired,
renderCell: PropTypes.func.isRequired,
sortable: PropTypes.bool,
onResort: PropTypes.func,
}

createHeight(props){
Expand Down Expand Up @@ -535,6 +536,10 @@ class SortableSudokuGrid extends Component {
this.setState({
dataSource,
})

if (this.props.onResort) {
this.props.onResort(dataSource)
}
}

_removeData = (cellIndex) => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"homepage": "https://github.com/react-native-component/react-native-smart-sortable-sudoku-grid#readme",
"dependencies": {
"prop-types": "^15.6.0",
"react-native-smart-timer-enhance": "^1.0.2"
}
}