Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #101412

    hello! I use vue.
    I  want the smart-window popup to open when I click the columns button.
    this is my code,

    <div>{label: jQuery.i18n.prop("test"), dataField: 'test', width: 200, align: 'center'</div>
    <div>                              , template: function(formatObject){</div>
    <div>                                  if (!formatObject.template){</div>
    <div>                                    const button = document.createElement("smart-button");</div>
    <div>                                    button.innerHTML = formatObject.value;</div>
    <div>                                    button.row = formatObject.row;</div>
    <div>                                    console.log("button row?", button.row)</div>
    <div>                                    var dialogWindow = document.createElement("smart-window");</div>
    <div>                          "dialogwindow"</div>
    <div>                                    //dialogWindow.innerHTML = <code><div>hello</code> + formatObject.value + <code></div></code>;</div>
    <div>                                    dialogWindow.addEventListener("open", function(event) {</div>
    <div>                                      console.log("open!")</div>
    <div>                                    });</div>
    <div>                                    button.addEventListener("click", function() {</div>
    <div>                                      console.log('Button inside the column was clicked')</div>
    <div>                            ;</div>
    <div>                                      //</div>
    <div>                                    });</div>

    and this error was returned.

    Uncaught TypeError: is not a function
    at HTMLElement.<anonymous>

    Hi dusrkdldlr,
    The problme here in your case is quite simple.First you define ‘dialogWindow’ with capital ‘W’ but in the event listener of the button you use it with lowercase ‘w’ just change your code to this”

     button.addEventListener("click", function() {
                console.log('Button inside the column was clicked')

    Please, do not hesitate to contact us if you have any additional questions.
    Best regards,
    Yavor Dashev
    Smart UI Team

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.