advanced-chat / vue-advanced-chat

A beautiful chat rooms web component compatible with all Javascript frameworks
https://advanced-chat.github.io/vue-advanced-chat/
MIT License
1.67k stars 456 forks source link

Issue with `no-room-selected` slot #464

Open dynomind-dev opened 1 year ago

dynomind-dev commented 1 year ago

Describe the bug

Slot no-room-selected does not work.

Steps to reproduce

<template>
    <div>
        <vue-advanced-chat>
            <div slot="rooms-empty">Replace the empty rooms template</div>
            <div slot="no-room-selected">Replace the no room selected template</div>
        </vue-advanced-chat>
    </div>
</template>

<script>
import { register } from 'vue-advanced-chat'
register()

export default {}
</script>

<style lang="scss"></style>

Expected behavior

Slot content should be used for no room selected block.

Screenshots

image

Device (please complete the following information)

Additional context

I checked it in vue sandbox too. https://github.com/dynomind-dev/vue-advanced-chat-sandbox/tree/issue/no-room-selected

edwinofsakh commented 1 year ago

It looks like adding v-show will fix this problem.

...
   <vue-advanced-chat
      v-show="isReady"    
...   
   mounted() {
      setTimeout(() => {
         this.isReady = true
      })
   },
...