@atlaskit/link-datasource 3.6.2 → 3.6.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 3.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.6.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#152012](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152012)
14
+ [`987acdd1b8cf4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/987acdd1b8cf4) -
15
+ Prevents double calls when clicking same filter option for CLOL modal.
16
+
3
17
  ## 3.6.2
4
18
 
5
19
  ### Patch Changes
@@ -76,6 +76,10 @@ var DateRangePicker = exports.DateRangePicker = function DateRangePicker(_ref) {
76
76
  setIsPickerOpen(false);
77
77
  };
78
78
  var handleClickFilterOption = (0, _react.useCallback)(function (option) {
79
+ if (option === currentOption) {
80
+ setIsPickerOpen(false);
81
+ return;
82
+ }
79
83
  setCurrentOption(option);
80
84
  onSelectionChange({
81
85
  value: option
@@ -83,7 +87,7 @@ var DateRangePicker = exports.DateRangePicker = function DateRangePicker(_ref) {
83
87
  if (option !== 'custom') {
84
88
  setIsPickerOpen(false);
85
89
  }
86
- }, [onSelectionChange]);
90
+ }, [onSelectionChange, currentOption]);
87
91
  var handlePickerToggle = function handlePickerToggle() {
88
92
  if (isPickerOpen) {
89
93
  setCustomToDate(toDate);
@@ -51,6 +51,10 @@ export const DateRangePicker = ({
51
51
  setIsPickerOpen(false);
52
52
  };
53
53
  const handleClickFilterOption = useCallback(option => {
54
+ if (option === currentOption) {
55
+ setIsPickerOpen(false);
56
+ return;
57
+ }
54
58
  setCurrentOption(option);
55
59
  onSelectionChange({
56
60
  value: option
@@ -58,7 +62,7 @@ export const DateRangePicker = ({
58
62
  if (option !== 'custom') {
59
63
  setIsPickerOpen(false);
60
64
  }
61
- }, [onSelectionChange]);
65
+ }, [onSelectionChange, currentOption]);
62
66
  const handlePickerToggle = () => {
63
67
  if (isPickerOpen) {
64
68
  setCustomToDate(toDate);
@@ -66,6 +66,10 @@ export var DateRangePicker = function DateRangePicker(_ref) {
66
66
  setIsPickerOpen(false);
67
67
  };
68
68
  var handleClickFilterOption = useCallback(function (option) {
69
+ if (option === currentOption) {
70
+ setIsPickerOpen(false);
71
+ return;
72
+ }
69
73
  setCurrentOption(option);
70
74
  onSelectionChange({
71
75
  value: option
@@ -73,7 +77,7 @@ export var DateRangePicker = function DateRangePicker(_ref) {
73
77
  if (option !== 'custom') {
74
78
  setIsPickerOpen(false);
75
79
  }
76
- }, [onSelectionChange]);
80
+ }, [onSelectionChange, currentOption]);
77
81
  var handlePickerToggle = function handlePickerToggle() {
78
82
  if (isPickerOpen) {
79
83
  setCustomToDate(toDate);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -58,7 +58,7 @@
58
58
  "@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
59
59
  "@atlaskit/layering": "^0.6.0",
60
60
  "@atlaskit/link-client-extension": "^2.4.0",
61
- "@atlaskit/linking-common": "^5.12.0",
61
+ "@atlaskit/linking-common": "^6.0.0",
62
62
  "@atlaskit/linking-types": "^9.0.0",
63
63
  "@atlaskit/logo": "^14.3.0",
64
64
  "@atlaskit/lozenge": "^11.11.0",
@@ -72,12 +72,12 @@
72
72
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
73
73
  "@atlaskit/primitives": "^12.2.0",
74
74
  "@atlaskit/select": "^18.1.0",
75
- "@atlaskit/smart-card": "^30.0.0",
75
+ "@atlaskit/smart-card": "^30.1.0",
76
76
  "@atlaskit/smart-user-picker": "6.10.3",
77
77
  "@atlaskit/spinner": "^16.3.0",
78
78
  "@atlaskit/tag": "^12.6.0",
79
79
  "@atlaskit/textfield": "6.5.3",
80
- "@atlaskit/theme": "^13.0.0",
80
+ "@atlaskit/theme": "^13.1.0",
81
81
  "@atlaskit/tokens": "^2.0.0",
82
82
  "@atlaskit/tooltip": "^18.8.0",
83
83
  "@atlaskit/ufo": "^0.3.0",