Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props) {
super(props);
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
this.state = {
dataSource: dataSource,
searchTerm: '',
sortBy: props.defaultSortKey,
isAscending: props.defaultSortDirection === 'ascending',
selection: props.selection,
expandedRows: [],
};
this.cellRefsMap = {}; // { rowId: reference, rowId: reference, ...}
this.dataTableRef = null;
this.onSearchChange = this.onSearchChange.bind(this);
this.onColumnSort = this.onColumnSort.bind(this);
this.focusNextField = this.focusNextField.bind(this);
this.renderFooter = this.renderFooter.bind(this);
constructor(props) {
super(props);
let dataSource = new ListView.DataSource({
rowHasChanged(a, b) {
// Always re-render TodoList items.
return a.done !== b.done || a.text !== b.text || a.items || b.items;
}
});
this.state = {
dataSource: this._cloneDataSource(dataSource, props),
};
this.renderRow = this.renderRow.bind(this);
}
constructor(props) {
super(props);
let dataSource = new ListView.DataSource({
rowHasChanged(a, b) {
// Always re-render TodoList items.
return a.done !== b.done || a.text !== b.text || a.items || b.items;
}
});
this.state = {
dataSource: this._cloneDataSource(dataSource, props),
};
this.renderRow = this.renderRow.bind(this);
}
constructor(props) {
super(props);
this._service = new Network();
this._group = this.props.group;
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
this._mounted = false;
this._memberListData = [];
this.state = {
dataSource: dataSource.cloneWithRows(this._memberListData),
loaded: false,
totalMembers: 0,
onlineMembers: 0,
roomName: this.props.roomTitle ? this.props.roomTitle : this.props.roomName,
layout: {
height,
width,
},
};
this._membersCallback = this._membersCallback.bind(this);
constructor(props) {
super(props);
this._service = new Network();
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
this._mounted = false;
this.state = {
dataSource: dataSource.cloneWithRows(dataSource),
loaded: false,
items: this._service.chat.service.availableChannels,
connected: false,
appState: AppState.currentState,
};
}
constructor(props) {
super(props);
this._service = new Network();
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
this._mounted = false;
this.state = {
dataSource: dataSource.cloneWithRows(dataSource),
loaded: false,
items: this._service.chat.service.availableChannels,
connected: false,
appState: AppState.currentState,
};
}
themeColor: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
todos: PropTypes.object.isRequired,
realm: PropTypes.any,
style: PropTypes.object,
toggleTab: PropTypes.func,
}
static defaultProps = {
remainCount: 0,
}
state = {
remainCount: this.props.todos.filtered('completed = false').length,
newTodo: '',
dataSource: new ListView.DataSource({rowHasChanged: (row1, row2) => {
return row1 !== row2
}}),
}
componentDidMount() {
this.resetDataSource()
}
_resetDataSource = () => {
this.setState({
dataSource: this.state.dataSource.cloneWithRows(this.props.todos),
remainCount: this.props.todos.filtered('completed = false').length,
})
LayoutAnimation.configureNext(animations)
}
constructor(props) {
super(props);
const n = new Network();
this._group = this.props.group;
const dataSource = new ListView.DataSource({
rowHasChanged: (row1, row2) => row1 !== row2,
});
this.state = {
_network: n,
dataSource: dataSource.cloneWithRows(memberListData),
loaded: false,
roomObj: this.props.group,
text: '',
};
this._searchRoomsCallback = this._searchRoomsCallback.bind(this);
this._createRoomCallback = this._createRoomCallback.bind(this);
this.createRoom = this.createRoom.bind(this);
}
getInitialState() {
var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1.solved !== r2.solved});
return {
dataSource: ds.cloneWithRows(GokuDB.getBoards()),
};
},
render() {