vue-advanced-chat icon indicating copy to clipboard operation
vue-advanced-chat copied to clipboard

Search does not work correctly after page load.

Open NINI1988 opened this issue 2 years ago • 3 comments

Describe the bug

The Search bar does not filter correctly after page load. And it seams like that the fetch-more-rooms event is not fired correctly.

Steps to reproduce

  1. Go to https://antoine92190.github.io/vue-advanced-chat/
  2. Paste eg. xxxxxxnoxxxtextxxxxxxfoundxxxxxxxx in the search bar
  3. Remove the search text and paste it again
  4. After around 5 retries the whole conversation list has been loaded and after that the filterring works as expected

Expected behavior

There should be no conversation be visible, because the search text can not be found. And the whole conversation list should be loaded, because fetch-more-rooms must be fired the whole time when the end of the conversation list is reached.

Screenshots

Bildschirmfoto am 2022-07-14 um 21 13 29

Device

  • OS: Windows 11
  • Browser: Chrome 103, Firefox 102
  • Package version: 1.5.5

Additional context

NINI1988 avatar Jul 14 '22 19:07 NINI1988

Is it maybe the case that the filtering is not applied when the conversation list has been changed?

NINI1988 avatar Jul 16 '22 20:07 NINI1988

Indeed there is an issue there. I think the best would be to add a custom behaviour when searching rooms, so you are able to filter rooms on your side and make the feature more flexible, especially when using pagination.

antoine92190 avatar Jul 19 '22 05:07 antoine92190

For me it is OK to have the default implementation of the search bar. We don't have that many conversations, but it would be nice if the search would work as expected.

And optional an implementation for custom searches for other scenarios.

NINI1988 avatar Jul 28 '22 16:07 NINI1988