botfront / rasa-webchat

A feature-rich chat widget for Rasa and Botfront
https://botfront.io/rasa
Apache License 2.0
948 stars 496 forks source link

How to disable text input when carousel is showing? #394

Closed epeirce closed 2 years ago

epeirce commented 3 years ago

How can i disable the text input when the carousel is showing? Any ideas? I've tried some custom metadata, but doesn't seem to be working.

Note that I only want it disabled for the particular carousel response.

MatthieuJnon commented 3 years ago

In the metadata of the carousel response, add userInput: 'hide'

epeirce commented 3 years ago

Where exactly does the metadata go below?

carousel = {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": cards
            }
        }

dispatcher.utter_message(attachment=carousel)
epeirce commented 3 years ago

Thank you for the quick reply!!

MatthieuJnon commented 3 years ago

I'm not sure, try at the root and if it doesn't work try in payload

https://github.com/botfront/rasa-webchat/blob/c8cbda78ec9b746f2697aa8c279c84f1b260fd1f/src/components/Widget/index.js#L237

This is where it gets the message and applies the metadata

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.