mattmezza / vue-beautiful-chat

A simple and beautiful Vue chat component backend agnostic, fully customisable and extendable.
https://matteo.merola.co/vue-beautiful-chat/
MIT License
1.5k stars 441 forks source link

Not Showing edit button for messages #254

Closed ga2tes closed 2 years ago

ga2tes commented 2 years ago

props :showEdition the edit button for messages are not showing

template:

       <beautiful-chat
            :participants="participants"
            :titleImageUrl="titleImageUrl"
            :onMessageWasSent="onMessageWasSent"
            :messageList="messageList"
            :newMessagesCount="newMessagesCount"
            :isOpen="isChatOpen"
            :close="closeChat"
            :open="openChat"
            :showEmoji="true"
            :showFile="true"
            :showEdition="true"
            :showDeletion="true"
            :showTypingIndicator="showTypingIndicator"
            :showLauncher="true"
            :showCloseButton="false"
            :colors="colors"
            :alwaysScrollToBottom="alwaysScrollToBottom"
            :disableUserListToggle="false"
            :messageStyling="messageStyling"
            @onType="handleOnType"
            @edit="editMessage"
        >
            <template v-slot:header>
                🤔 Good chat between
                {{ participants.map(m => m.name).join(" & ") }}
            </template>

            <template v-slot:user-avatar="{ message, user }">
                <div
                    style= ""
                    v-if="message.type === 'text' && user && user.name"
                >
                    {{ user.name.toUpperCase()[0] }}
                </div>
            </template>

            <template v-slot:system-message-body="{ message }">
                [System]: {{ message.text }}
            </template>
        </beautiful-chat>
 messageList: [
                { type: "text", author: `me`, data: { text: `Say yes!` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `1`, data: { text: `No.` } },
                { type: "text", author: `me`, data: { text: `Say yes!` } },
                { type: "text", author: `me`, data: { text: `Say yes!` } }
            ],
github-actions[bot] commented 2 years ago

Thanks for opening up your first issue!

ixtiyorjon commented 2 years ago

props :showEdition the edit button for messages are not showing

ixtiyorjon commented 2 years ago

how can i solve this ?

ixtiyorjon commented 2 years ago

issue #101

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.