freshworks/crayons

[Bug] - Cannot update text for fw-button

sabatale opened this issue · 1 comments

Component
fw-button (v4)

Describe the bug
More of a question, really. We could not find an event to update the button text.

When trying something simple such as document.getElementById("fw-button-id").textContent = "ABC"; or value = ... the new text is written outside of the button (most likely because it doesn't consider the spans generated by the fw-button).

To Reproduce
Steps to reproduce the current behavior:

document.getElementById("fw-button-id").textContent = "ABC";

Screenshots

image

@sabatale Please check the below code sandbox link to update the button text.
https://codesandbox.io/s/zen-newton-l9vlsk