@elliemae/ds-data-table 2.0.0-alpha.6 → 2.0.0-alpha.7

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.
@@ -65,7 +65,7 @@ const DateRangeFilter = props => {
65
65
  setEndDate(dateRange.endDate || '');
66
66
  }, [dateRange]);
67
67
  React.useEffect(() => {
68
- if (!startDate.includes('_') && !endDate.includes('_')) {
68
+ if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {
69
69
  onValueChange(FilterTypes.FILTER_TYPES.DATE_RANGE, {
70
70
  startDate,
71
71
  endDate
@@ -27,6 +27,7 @@ const MultiSelectPill = ({
27
27
 
28
28
  if (newFilters[filterIndex].value.length === 0) {
29
29
  if (prevRef !== null && prevRef !== void 0 && prevRef.current) prevRef.current.focus();else nextRef.current.focus();
30
+ newFilters.splice(filterIndex, 1);
30
31
  }
31
32
 
32
33
  onFiltersChange(newFilters);
@@ -34,11 +35,11 @@ const MultiSelectPill = ({
34
35
  return value !== null && value !== void 0 && value.length ? /*#__PURE__*/_jsx__default["default"](dsPills.DSPillGroupV2, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
35
36
  type: "label",
36
37
  label: columnHeader
37
- }), value.map(val => /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
38
+ }), value.map((val, index) => /*#__PURE__*/_jsx__default["default"](dsPills.DSPillV2, {
38
39
  type: "removable",
39
40
  label: val,
40
41
  onRemove: () => handleOnRemove(val),
41
- innerRef: innerRef
42
+ innerRef: index === value.length - 1 ? innerRef : {}
42
43
  }, val))) : null;
43
44
  };
44
45
 
@@ -55,7 +55,7 @@ const DateRangeFilter = props => {
55
55
  setEndDate(dateRange.endDate || '');
56
56
  }, [dateRange]);
57
57
  useEffect(() => {
58
- if (!startDate.includes('_') && !endDate.includes('_')) {
58
+ if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {
59
59
  onValueChange(FILTER_TYPES.DATE_RANGE, {
60
60
  startDate,
61
61
  endDate
@@ -19,6 +19,7 @@ const MultiSelectPill = ({
19
19
 
20
20
  if (newFilters[filterIndex].value.length === 0) {
21
21
  if (prevRef !== null && prevRef !== void 0 && prevRef.current) prevRef.current.focus();else nextRef.current.focus();
22
+ newFilters.splice(filterIndex, 1);
22
23
  }
23
24
 
24
25
  onFiltersChange(newFilters);
@@ -26,11 +27,11 @@ const MultiSelectPill = ({
26
27
  return value !== null && value !== void 0 && value.length ? /*#__PURE__*/_jsx(DSPillGroupV2, {}, void 0, /*#__PURE__*/_jsx(DSPillV2, {
27
28
  type: "label",
28
29
  label: columnHeader
29
- }), value.map(val => /*#__PURE__*/_jsx(DSPillV2, {
30
+ }), value.map((val, index) => /*#__PURE__*/_jsx(DSPillV2, {
30
31
  type: "removable",
31
32
  label: val,
32
33
  onRemove: () => handleOnRemove(val),
33
- innerRef: innerRef
34
+ innerRef: index === value.length - 1 ? innerRef : {}
34
35
  }, val))) : null;
35
36
  };
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-data-table",
3
- "version": "2.0.0-alpha.6",
3
+ "version": "2.0.0-alpha.7",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Data Table",
6
6
  "module": "./esm/index.js",
@@ -642,9 +642,9 @@
642
642
  "dependencies": {
643
643
  "@dnd-kit/core": "^3.0.4",
644
644
  "@dnd-kit/sortable": "^3.0.1",
645
- "@elliemae/ds-basic": "2.0.0-alpha.6",
646
- "@elliemae/ds-date-picker": "2.0.0-alpha.6",
647
- "@elliemae/ds-date-range-picker": "2.0.0-alpha.6",
645
+ "@elliemae/ds-basic": "2.0.0-alpha.7",
646
+ "@elliemae/ds-date-picker": "2.0.0-alpha.7",
647
+ "@elliemae/ds-date-range-picker": "2.0.0-alpha.7",
648
648
  "@popperjs/core": "^2.9.3",
649
649
  "@reduxjs/toolkit": "^1.5.1",
650
650
  "array-move": "^3.0.1",