Commit 4b2c7a9c authored by Joram Wilander's avatar Joram Wilander Committed by Harrison Healey

Page correctly on add members to channel modal (#74)

parent 0fa906d9
......@@ -38,13 +38,6 @@ export default class ChannelInviteModal extends React.Component {
constructor(props) {
super(props);
this.onChange = this.onChange.bind(this);
this.onStatusChange = this.onStatusChange.bind(this);
this.onHide = this.onHide.bind(this);
this.handleInviteError = this.handleInviteError.bind(this);
this.nextPage = this.nextPage.bind(this);
this.search = this.search.bind(this);
this.term = '';
this.searchTimeoutId = 0;
......@@ -76,7 +69,7 @@ export default class ChannelInviteModal extends React.Component {
UserStore.removeStatusesChangeListener(this.onStatusChange);
}
onChange() {
onChange = () => {
let users;
if (this.term) {
users = searchProfilesNotInCurrentChannel(store.getState(), this.term, true);
......@@ -93,18 +86,18 @@ export default class ChannelInviteModal extends React.Component {
});
}
onStatusChange() {
onStatusChange = () => {
// Initiate a render to pick up on new statuses
this.setState({
statusChange: !this.state.statusChange
});
}
onHide() {
onHide = () => {
this.setState({show: false});
}
handleInviteError(err) {
handleInviteError = (err) => {
if (err) {
this.setState({
inviteError: err.message
......@@ -116,11 +109,11 @@ export default class ChannelInviteModal extends React.Component {
}
}
nextPage(page) {
this.props.actions.getProfilesNotInChannel(TeamStore.getCurrentId(), this.props.channel.id, (page + 1) * USERS_PER_PAGE, USERS_PER_PAGE);
nextPage = (page) => {
this.props.actions.getProfilesNotInChannel(TeamStore.getCurrentId(), this.props.channel.id, page + 1, USERS_PER_PAGE);
}
search(term) {
search = (term) => {
clearTimeout(this.searchTimeoutId);
this.term = term;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment