JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid addEventListener change produces the event and exports twice.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #104074
    taran naidu


    We are exporting on a smart-grid with the help of smart-drop-down-list and every time there is a change the value is picked up and the data is exported on a condition.

    The issue that really occurs is that the event is fired twice and produces two exports for a single event (change of a dropdown value in our case).
    Any idea how this can be resolved?


    const gridExport = document.querySelector(‘smart-grid’);


    let dropdown = document.createElement(‘smart-drop-down-list’); = “dropdownlist”;
    const dropdownExport = document.querySelector(‘#dropdownlist’);


    dropdownExport.addEventListener(‘change’, function(event) {
    const detail = event.detail;
    if (detail.value === “Download as spreadsheet”){
    } else if (detail.value === “Download as CSV file”){
    else {


    Hi taran,

    The “change” event may occur twice or more times in case it is added more than once. The other reason could be that the component is inside another component which raises “change” as well and the event bubbles up.

    Best regards,
    Peter Stoev

    Smart UI Team

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