@brightspace-ui/core 2.177.4 → 2.178.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
8
8
|
* A tag-list allowing the user to see (and remove) the currently applied filters.
|
9
9
|
*/
|
10
10
|
|
11
|
-
const CLEAR_TIMEOUT =
|
11
|
+
const CLEAR_TIMEOUT = 310; /** Corresponds to timeout in _dispatchChangeEvent in filter + 10 ms */
|
12
12
|
|
13
13
|
class FilterTags extends LocalizeCoreElement(LitElement) {
|
14
14
|
static get properties() {
|
@@ -573,13 +573,12 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
573
573
|
|
574
574
|
_dispatchChangeEvent(dimension, change) {
|
575
575
|
this._setDimensionChangeEvent(dimension, change, false);
|
576
|
+
clearTimeout(this._changeEventTimeout);
|
576
577
|
|
577
|
-
|
578
|
-
|
579
|
-
this.
|
580
|
-
|
581
|
-
}, 200);
|
582
|
-
}
|
578
|
+
/** 300 ms timeout used in filter-tags CLEAR_TIMEOUT. If the timeout here changes, update that as well */
|
579
|
+
this._changeEventTimeout = setTimeout(() => {
|
580
|
+
this._dispatchChangeEventNow(false);
|
581
|
+
}, 300);
|
583
582
|
}
|
584
583
|
|
585
584
|
_dispatchChangeEventNow(allCleared) {
|
@@ -594,8 +593,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
594
593
|
detail: { allCleared: allCleared, dimensions: dimensions }
|
595
594
|
}));
|
596
595
|
this._changeEventsToDispatch = new Map();
|
597
|
-
this._changeEventTimeout
|
598
|
-
|
596
|
+
clearTimeout(this._changeEventTimeout);
|
599
597
|
this._activeFiltersSubscribers.updateSubscribers();
|
600
598
|
}
|
601
599
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.178.0",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|