Skip to content

Commit

Permalink
Merge pull request #69 from eea/develop
Browse files Browse the repository at this point in the history
Release: Don't use the content if in add form
  • Loading branch information
avoinea authored Jun 14, 2024
2 parents 80bd7fb + 8ba4109 commit 6f1ffef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [8.0.2](https://github.com/eea/volto-tableau/compare/8.0.1...8.0.2) - 13 May 2024
### [8.0.3](https://github.com/eea/volto-tableau/compare/8.0.2...8.0.3) - 14 June 2024

#### :house: Internal changes
#### :hammer_and_wrench: Others

- chore: cleanup package.json [alin - [`fe3f9a4`](https://github.com/eea/volto-tableau/commit/fe3f9a41f15eb660a668933e093b5d6c30db669b)]
- test: Fix eslint [alin - [`37e6137`](https://github.com/eea/volto-tableau/commit/37e613703363336d5ce73b0ebfcb43c200451122)]
- Don't use the content if in add form [Miu Razvan - [`f37a78f`](https://github.com/eea/volto-tableau/commit/f37a78f459ed954e06c978e93e7bf1bf2590eff7)]
### [8.0.2](https://github.com/eea/volto-tableau/compare/8.0.1...8.0.2) - 13 May 2024

### [8.0.1](https://github.com/eea/volto-tableau/compare/8.0.0...8.0.1) - 8 May 2024

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-tableau",
"version": "8.0.2",
"version": "8.0.3",
"description": "@eeacms/volto-tableau: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
7 changes: 4 additions & 3 deletions src/Widgets/VisualizationWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import '@eeacms/volto-tableau/less/tableau.less';
const VisualizationWidget = (props) => {
const { location, content } = props;
const ogValue = props.value || {};
const inAddForm = props.location.pathname.split('/').pop() === 'add';
const viz = React.useRef();
const [schema, setSchema] = React.useState(null);
const [vizState, setVizState] = React.useState({
Expand All @@ -34,7 +35,7 @@ const VisualizationWidget = (props) => {
getTableauVisualization({
isBlock: false,
content: {
...content,
...(inAddForm ? {} : content),
tableau_visualization: value,
},
}),
Expand Down Expand Up @@ -76,12 +77,12 @@ const VisualizationWidget = (props) => {
getTableauVisualization({
isBlock: false,
content: {
...content,
...(inAddForm ? {} : content),
tableau_visualization: value,
},
}),
);
}, [content, value]);
}, [content, value, inAddForm]);

/**
* Update query
Expand Down

0 comments on commit 6f1ffef

Please sign in to comment.