@diosmosis opened this Pull Request on May 18th 2022 Member

Description:

This PR adds a new method that issues an AJAX request after aborting the existing ongoing request if one exists. This is a pattern I've seen a lot, it seemed worth adding a utility function to core.

Usage:

defineComponent({
  methods: {
    performRequest: oneAtATime<ResponseType>('MyPlugin.myMethod'),
    doSomething() {
      this.performRequest({ idSite, period, ... }).then(() => {
        // ...
      });
    },
  },
});

Review

This Pull Request was closed on May 19th 2022
Powered by GitHub Issue Mirror