@eeacms/volto-tableau 8.0.2 → 8.0.3
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
|
@@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [8.0.
|
|
7
|
+
### [8.0.3](https://github.com/eea/volto-tableau/compare/8.0.2...8.0.3) - 14 June 2024
|
|
8
8
|
|
|
9
|
-
#### :
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- test: Fix eslint [alin - [`37e6137`](https://github.com/eea/volto-tableau/commit/37e613703363336d5ce73b0ebfcb43c200451122)]
|
|
12
|
+
- Don't use the content if in add form [Miu Razvan - [`f37a78f`](https://github.com/eea/volto-tableau/commit/f37a78f459ed954e06c978e93e7bf1bf2590eff7)]
|
|
13
|
+
### [8.0.2](https://github.com/eea/volto-tableau/compare/8.0.1...8.0.2) - 13 May 2024
|
|
12
14
|
|
|
13
15
|
### [8.0.1](https://github.com/eea/volto-tableau/compare/8.0.0...8.0.1) - 8 May 2024
|
|
14
16
|
|
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@ import '@eeacms/volto-tableau/less/tableau.less';
|
|
|
20
20
|
const VisualizationWidget = (props) => {
|
|
21
21
|
const { location, content } = props;
|
|
22
22
|
const ogValue = props.value || {};
|
|
23
|
+
const inAddForm = props.location.pathname.split('/').pop() === 'add';
|
|
23
24
|
const viz = React.useRef();
|
|
24
25
|
const [schema, setSchema] = React.useState(null);
|
|
25
26
|
const [vizState, setVizState] = React.useState({
|
|
@@ -34,7 +35,7 @@ const VisualizationWidget = (props) => {
|
|
|
34
35
|
getTableauVisualization({
|
|
35
36
|
isBlock: false,
|
|
36
37
|
content: {
|
|
37
|
-
...content,
|
|
38
|
+
...(inAddForm ? {} : content),
|
|
38
39
|
tableau_visualization: value,
|
|
39
40
|
},
|
|
40
41
|
}),
|
|
@@ -76,12 +77,12 @@ const VisualizationWidget = (props) => {
|
|
|
76
77
|
getTableauVisualization({
|
|
77
78
|
isBlock: false,
|
|
78
79
|
content: {
|
|
79
|
-
...content,
|
|
80
|
+
...(inAddForm ? {} : content),
|
|
80
81
|
tableau_visualization: value,
|
|
81
82
|
},
|
|
82
83
|
}),
|
|
83
84
|
);
|
|
84
|
-
}, [content, value]);
|
|
85
|
+
}, [content, value, inAddForm]);
|
|
85
86
|
|
|
86
87
|
/**
|
|
87
88
|
* Update query
|