react-chat-widget
react-chat-widget copied to clipboard
How to use setQuickButtons ?
Hi,
I am kind of new with reactJs and I can't succeed in using setQuickButtons. According to the documentation we should use an array of objects containing label and values.
I tried the following but it's not working
var buttons = { buttons: [ { label: 'My awesome link', value: 'https://github.com/Wolox/react-chat-widget', }] }
setQuickButtons(buttons);
Any help would be very appreciated
Hi!
Yes, this method needs an array of objects with label
and value
properties set. The problem is that you're passing it an object instead of an array. Try this instead:
let buttons = [
{
label: 'My awesome link',
value: 'https://github.com/Wolox/react-chat-widget',
}
];
setQuickButtons(buttons);
It doesn't work.
TypeError: Object(...) is not a function
src/Chat.jsx:121
> 121 | setQuickButtons(buttons);
This is the version I use:
"react-chat-widget": "^2.1.4-1"
Same error here, it does not work and i use the same exact version. Should we convert this issue into a bug ?
Actually, i checked in node_modules, and the version retrieved does not include the latest change (and this latest change is bringing quickButtons)
Seems like the readme.md does not reflect the latest released features
Does anyone know when the version with quickButtons will be released?
Is setQuickButtons still not accessible ?
Is setQuickButtons still not accessible ?
Still not
Any idea when the new release is going to be ?
Still not released. Any updates? (^2.1.4-1)
This can probably be closed since the functionality is there! @WoodyFleurant