mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-03 03:25:24 +03:00
Merge pull request #916 from esteemapp/bugfix/following-searh
Fixed search issue on following page
This commit is contained in:
commit
370318dfd8
@ -1,10 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import get from 'lodash/get';
|
||||
|
||||
// Middleware
|
||||
|
||||
// Constants
|
||||
import { default as ROUTES } from '../../../constants/routeNames';
|
||||
|
||||
// Utilities
|
||||
|
||||
// Services and Actions
|
||||
@ -83,11 +81,13 @@ class FollowsContainer extends Component {
|
||||
};
|
||||
|
||||
_handleSearch = async text => {
|
||||
const { users, username } = this.state;
|
||||
const { users, username, isFollowingPress } = this.state;
|
||||
let newData;
|
||||
|
||||
newData = users.filter(item => {
|
||||
const itemName = item.follower.toUpperCase();
|
||||
const itemName = isFollowingPress
|
||||
? get(item, 'following').toUpperCase()
|
||||
: get(item, 'follower').toUpperCase();
|
||||
const _text = text.toUpperCase();
|
||||
|
||||
return itemName.indexOf(_text) > -1;
|
||||
|
Loading…
Reference in New Issue
Block a user