@semantic-ui/query
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -26,5 +26,5 @@ { | ||
"dependencies": { | ||
"@semantic-ui/utils": "^0.0.30" | ||
"@semantic-ui/utils": "^0.0.31" | ||
}, | ||
"version": "0.0.30" | ||
"version": "0.0.31" | ||
} |
@@ -355,3 +355,3 @@ import { isPlainObject, isString, isArray, isDOM, isFunction, findIndex, inArray, isClient, isObject, each } from '@semantic-ui/utils'; | ||
handler, | ||
abort: () => abortController.abort(), | ||
abort: (reason) => abortController.abort(reason), | ||
}; | ||
@@ -358,0 +358,0 @@ eventHandlers.push(eventHandler); |
@@ -557,2 +557,14 @@ import { describe, beforeEach, afterEach, expect, it, vi } from 'vitest'; | ||
it('should be able to remove event handlers using custom abortController', () => { | ||
const div = document.createElement('div'); | ||
document.body.appendChild(div); | ||
const callback = vi.fn(); | ||
const abortController = new AbortController();; | ||
const eventHandler = $('div').on('click', callback, { abortController }); | ||
div.click(); | ||
abortController.abort(); | ||
div.click(); | ||
expect(callback).toHaveBeenCalledTimes(1); | ||
}); | ||
it('should be able to remove event handlers using returned abortController', () => { | ||
@@ -559,0 +571,0 @@ const div = document.createElement('div'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82734
2044
+ Added@semantic-ui/utils@0.0.31(transitive)
- Removed@semantic-ui/utils@0.0.30(transitive)
Updated@semantic-ui/utils@^0.0.31