Skip to content

Custom room search is broken #566

@daniser

Description

@daniser

Describe the bug

I implemented custom room search on a Laravel backend. Fortunetely latest version of Advanced Chat (2.1.1) fixed custom search because in 2.1.0 it was completely broken. But, one new issue has appeared. Even with custom-search-room-enabled flag, this package still forces frontend filtering after a fresh room list was already given by the backend.

I think I found the culprit here (RoomsList.vue):

computed: {
  filteredRooms() {
    return filteredItems(this.rooms || [], 'roomName', this.filter)
  }
},

After changing to this:

computed: {
  filteredRooms() {
    return this.customSearchRoomEnabled
      ? this.rooms || []
      : filteredItems(this.rooms || [], 'roomName', this.filter)
  }
},

... problem was resolved.

Expected behavior

With custom-search-room-enabled option set, package should not apply frontend filtering to room list when user entering text into the search field.

Device (please complete the following information)

  • OS: Windows 11
  • Browser: Chrome 142.0.7444.176
  • Package version: 2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions