I wanted to control the parent element of tooltip for send/stop button because we are using PF chatbot in an iframe. Initially I implemented
<MessageBar
onSendMessage={handleSend}
hasAttachButton={false}
hasStopButton={hasStopButton}
handleStopButton={handleStopButton}
buttonProps={{
send: {
tooltipProps: { appendTo: bodyElement },
},
stop: {
tooltipProps: { appendTo: bodyElement },
},
}}
/>
and found it did not work. I looked at MessageBar.tsx and found that buttonProps?.send?.tooltipProps was not used while buttonProps?.send?.tooltipContent was.
I could workaround the issue by modifying the code to
<MessageBar
onSendMessage={handleSend}
hasAttachButton={false}
hasStopButton={hasStopButton}
handleStopButton={handleStopButton}
buttonProps={{
send: {
//@ts-ignore
props: { tooltipProps: { appendTo: bodyElement } },
},
stop: {
//@ts-ignore
props: { tooltipProps: { appendTo: bodyElement } },
},
}}
/>
but I'd like to get rid of the use of @ts-ignore. Thanks.
I wanted to control the parent element of tooltip for send/stop button because we are using PF chatbot in an iframe. Initially I implemented
and found it did not work. I looked at MessageBar.tsx and found that
buttonProps?.send?.tooltipPropswas not used whilebuttonProps?.send?.tooltipContentwas.I could workaround the issue by modifying the code to
but I'd like to get rid of the use of
@ts-ignore. Thanks.