All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.frontend.buttonFunctions.js Maven / Gradle / Ivy

There is a newer version: 24.5.5
Show newest version
function disableOnClickListener({currentTarget: button}) {
  if (button.hasAttribute('disableOnClick')) {
    button.disabled = true;
  }
}

window.Vaadin.Flow.button = {
  initDisableOnClick: (button) => {
    if (!button.__hasDisableOnClickListener) {
      button.addEventListener('click', disableOnClickListener);
      button.__hasDisableOnClickListener = true;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy