Using botbuilder SDK's Prompt.choice(), is it possible to have a custom tooltip which displays long choice-text?

前端 未结 1 421
广开言路
广开言路 2020-12-22 00:55

I am using NodeJS SDK for creating a bot using MSFT botframework. I am giving choice option to user using builder.prompt.choice. Is it possible to hover over th

相关标签:
1条回答
  • 2020-12-22 01:44

    When using the Webchat channel, you can customize the channel implementation by following the guidelines provided on Microsoft's GitHub project here .

    In particular, in your case you just need to remove a properties on the ActionButton that is limiting the buttons to 1 line, adding ... if the line is too long.

    The modification that you have to do is to remove the following line on the function ActionButton in botchat.js file (looks like you can't simply do it on CSS side):

    this._element.style.whiteSpace="nowrap";
    

    By doing this you will have promptChoices like the following, where the 2nd choice has 2 lines:

    By the way, you can also add a title to the buttons to get the value when hovering with the mouse like I have ;-)

    0 讨论(0)
提交回复
热议问题