Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103305
    Joko Pitoyo
    Participant

    howto create custom button on header?

    header: {
    visible: true,
    buttons: [“search”],
    template:”<button>Add</button>”
    },

    above sample success with error…

    smart.elements.js:64 Uncaught TypeError: Cannot read properties of null (reading ‘_refreshDeleteButton’)
    at BaseElement._refreshFromSelection (smart.elements.js:64:28641)
    at f.dispatchEvent (smart.elements.js:6:27730)
    at f.fireEvent (smart.elements.js:6:27132)
    at BaseElement.clearSelection (smart.elements.js:58:63019)
    at o (smart.elements.js:65:134964)
    at BaseElement._refreshLayout (smart.elements.js:65:135207)
    at BaseElement._refresh (smart.elements.js:65:123867)
    at BaseElement.refresh (smart.elements.js:65:161000)
    at BaseElement.r (smart.elements.js:6:72232)
    at BaseElement.propertyChangedHandler (smart.elements.js:65:70206)
    _refreshFromSelection @ smart.elements.js:64
    dispatchEvent @ smart.elements.js:6
    fireEvent @ smart.elements.js:6
    clearSelection @ smart.elements.js:58
    o @ smart.elements.js:65
    _refreshLayout @ smart.elements.js:65
    _refresh @ smart.elements.js:65
    refresh @ smart.elements.js:65
    r @ smart.elements.js:6
    propertyChangedHandler @ smart.elements.js:65
    t.updateProperty @ smart.elements.js:6
    set @ smart.elements.js:6
    e @ smart.elements.js:6
    t.updateProperty @ smart.elements.js:6
    set @ smart.elements.js:6
    (anonymous) @ smart.elements.js:6
    window.<computed> @ smart.elements.js:6
    gps.init @ gps.js?v=1.0:5
    (anonymous) @ gps.js?v=1.0:87
    e @ jquery-3.6.0.min.js:2
    t @ jquery-3.6.0.min.js:2
    setTimeout (async)
    (anonymous) @ jquery-3.6.0.min.js:2
    c @ jquery-3.6.0.min.js:2
    fireWith @ jquery-3.6.0.min.js:2
    fire @ jquery-3.6.0.min.js:2
    c @ jquery-3.6.0.min.js:2
    fireWith @ jquery-3.6.0.min.js:2
    ready @ jquery-3.6.0.min.js:2
    B @ jquery-3.6.0.min.js:2
    smart.elements.js:64 Uncaught TypeError: Cannot read properties of null (reading ‘_refreshDeleteButton’)
    at BaseElement._refreshFromSelection (smart.elements.js:64:28641)
    at f.dispatchEvent (smart.elements.js:6:27730)
    at f.fireEvent (smart.elements.js:6:27132)
    at BaseElement.clearSelection (smart.elements.js:58:63019)
    at o (smart.elements.js:65:134964)
    at BaseElement._refreshLayout (smart.elements.js:65:135207)
    at BaseElement._refresh (smart.elements.js:65:123867)
    at BaseElement.refresh (smart.elements.js:65:161000)
    at BaseElement.r (smart.elements.js:6:72232)
    at BaseElement.propertyChangedHandler (smart.elements.js:65:70206)

    #103306

    Hi Joko,

    I have tried your code and it worked for me. The button is displayed in the header without error with the following header setting:

    header: {
    visible: true,
    buttons: [“search”],
    template: “< button > Add</button >”
    }

    Please check your version and update if available

    Best Regards,
    Svetoslav Borislavov

    Smart HTMLElements Team
    https://www.htmlelements.com/

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