Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How could I keep the buttons permanently after clicking the buttons #13

Open
ND-edward opened this issue Aug 16, 2022 · 2 comments
Open

Comments

@ND-edward
Copy link

ND-edward commented Aug 16, 2022

When I select any option the buttons are removed and showing the text, instead I want to have the buttons appear permanently without removing them.

Before selecting the choice the buttons are displayed

image

After the choice is selected the buttons are removed from bot response.

image

Instead, I want the buttons to be displayed and clickable just like below
image

Use case is, user can scroll up and select the previous choices without having to create a separate buttons for Back, Home, Menu etc Please let me know if this can be achieved

@ashrafulyarali
Copy link

you make unique div that for every menu.

@ashrafulyarali
Copy link

e.g:-
function addSuggestion(suggestions) {
setTimeout(() => {
const suggLength = suggestions.length;
$(
' <div class=+"singleCard">

',
)
.appendTo(".chats")
.hide()
.fadeIn(1000);
// Loop through suggestions
for (let i = 0; i < suggLength; i += 1) {
$(
<div class="menuChips" data-payload='${suggestions[i].payload}'>${suggestions[i].title}</div>,
).appendTo(".menu"+n.toString());
}
n=n+1;
scrollToBottomOfResults();
}, 1000);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants