@codacy/ui-components 0.66.65 → 0.66.66

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.
@@ -22,9 +22,10 @@ export const CheckboxFilterList = ({
22
22
  }
23
23
  //Range selection
24
24
  else {
25
- const range = [items.findIndex(i => i.key === prevCheckedBox), items.findIndex(i => i.key === key)].sort();
25
+ const range = [items.findIndex(i => i.key === prevCheckedBox), items.findIndex(i => i.key === key)].sort((a, b) => a - b);
26
26
  const itemsInRange = items.slice(range[0], range[1] + 1);
27
- onChange([...value, ...itemsInRange.map(i => i.key)]);
27
+ const newKeys = itemsInRange.map(i => i.key).filter(k => !value.includes(k));
28
+ onChange([...value, ...newKeys]);
28
29
  }
29
30
  setPrevCheckedBox(key);
30
31
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.66.65",
3
+ "version": "0.66.66",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",