Skip to content

Commit 2063976

Browse files
committed
(slots) add rooms-list-search
1 parent a30222b commit 2063976

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ Example:
600600
| `custom-action-icon` | Add a custom icon inside the footer | - | - | | `rooms-header` | Add a template on top of rooms list (above the search bar) | - | - |
601601
| `room-list-item` | Replace the template of the room list items | `room` | `room-list-options` |
602602
| `room-list-options` | Replace the template of the list room options | `room` | `room-list-options-icon` |
603-
| `rooms-header` | Replace the content above the search bar | - | - |
603+
| `rooms-header` | Replace the content above the search bar | - | - |
604+
| `rooms-list-search` | Replace the search bar | - | - |
604605
| `room-header` | Replace the template of the room header | `room`, `typingUsers`, `userStatus` | `room-options`, `menu-icon`, `toggle-icon` |
605606
| `room-header-avatar` | Replace the template of the room header avatar | `room` |
606607
| `room-header-info` | Replace the template of the room header text | `room`, `typingUsers`, `userStatus` |

src/ChatWindow/RoomsList/RoomsList.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66
>
77
<slot name="rooms-header" />
88

9-
<rooms-search
10-
:rooms="rooms"
11-
:loading-rooms="loadingRooms"
12-
:text-messages="textMessages"
13-
:show-add-room="showAddRoom"
14-
@search-room="searchRoom"
15-
@add-room="$emit('add-room')"
16-
>
17-
<template v-for="(i, name) in $scopedSlots" #[name]="data">
18-
<slot :name="name" v-bind="data" />
19-
</template>
20-
</rooms-search>
9+
<slot name="rooms-list-search">
10+
<rooms-search
11+
:rooms="rooms"
12+
:loading-rooms="loadingRooms"
13+
:text-messages="textMessages"
14+
:show-add-room="showAddRoom"
15+
@search-room="searchRoom"
16+
@add-room="$emit('add-room')"
17+
>
18+
<template v-for="(i, name) in $scopedSlots" #[name]="data">
19+
<slot :name="name" v-bind="data" />
20+
</template>
21+
</rooms-search>
22+
</slot>
2123

2224
<loader :show="loadingRooms" />
2325

0 commit comments

Comments
 (0)