DCzajkowski / vue-emoji-picker

Very simple, yet powerful, vue emoji picker 🎉🔥🚀
MIT License
332 stars 49 forks source link

Wrapping emoji-picker in transition is not working #18

Closed antoine92190 closed 4 years ago

antoine92190 commented 4 years ago

When trying to wrap the emoji-picker slot inside a transition, the emojis are not displayed.

<emoji-picker @emoji="insert" :search="search">
    <transition name="fade">
        <div slot="emoji-picker" slot-scope="{ emojis, insert, display }">
        ...
        </div>
    </transition>
</emoji-picker>
DCzajkowski commented 4 years ago

TBH I have never used the transition component. Does it normally work this way with scoped slots?

StuDownie commented 4 years ago

Try adding <transition name="fade" appear>

https://vuejs.org/v2/guide/transitions.html#Transitions-on-Initial-Render

And put the transition inside the slot

<emoji-picker @emoji="insert" :search="search">
        <div slot="emoji-picker" slot-scope="{ emojis, insert, display }">
            <transition name="fade" appear>
              ...
            </transition>
        </div>
</emoji-picker>
antoine92190 commented 4 years ago

@StuDownie That works thanks!