How can i make this setSearchKeyword dynamic in javascript

let usersRequest = new CometChat.UsersRequestBuilder()
  .setLimit(limit)
  .setSearchKeyword("abc")
  .build();

how can i make this setSearchKeyword dynamic in javascript

Hello @Priyanka09,

You would have to create a UsersRequestBuilder every time the input changes. For eg: when you type: super, then this should trigger a function which creates a UsersRequestBuilder with search keyword as super and fetches the user. On every input change this function have to be triggered. We have implemented search logic in our ReactJS sample app. I am sharing the link to our sample app below.

1 Like