@eeacms/volto-clms-theme 1.1.215 → 1.1.217
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,16 @@ 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
|
-
### [1.1.
|
|
7
|
+
### [1.1.217](https://github.com/eea/volto-clms-theme/compare/1.1.216...1.1.217) - 28 February 2025
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
- Refs #
|
|
11
|
+
- Refs #284744 - Scroll to correct position of the tab content when clicking on vertical tabs on a page. [GhitaB - [`0197086`](https://github.com/eea/volto-clms-theme/commit/0197086075ef09fc1a2efb8b0896175044659e08)]
|
|
12
|
+
- Refs #284744 - Fix FAQ error on edit. [GhitaB - [`de9db32`](https://github.com/eea/volto-clms-theme/commit/de9db3276d0802627dc836d36de08c0298f88858)]
|
|
13
|
+
### [1.1.216](https://github.com/eea/volto-clms-theme/compare/1.1.215...1.1.216) - 25 February 2025
|
|
14
|
+
|
|
15
|
+
### [1.1.215](https://github.com/eea/volto-clms-theme/compare/1.1.214...1.1.215) - 24 February 2025
|
|
16
|
+
|
|
12
17
|
### [1.1.214](https://github.com/eea/volto-clms-theme/compare/1.1.213...1.1.214) - 21 February 2025
|
|
13
18
|
|
|
14
19
|
### [1.1.213](https://github.com/eea/volto-clms-theme/compare/1.1.212...1.1.213) - 20 February 2025
|
package/package.json
CHANGED
|
@@ -41,10 +41,12 @@ const CclFAQBlockView = (props) => {
|
|
|
41
41
|
const [activeIndex, setActiveIndex] = useState([]);
|
|
42
42
|
|
|
43
43
|
const dispatch = useDispatch();
|
|
44
|
+
|
|
44
45
|
const contextNavigationItems = useSelector(
|
|
45
46
|
(state) =>
|
|
46
47
|
state.contextNavigation?.[cn_key]?.data?.items ||
|
|
47
|
-
content['@components']?.['contextnavigation']?.items
|
|
48
|
+
content?.['@components']?.['contextnavigation']?.items ||
|
|
49
|
+
[],
|
|
48
50
|
);
|
|
49
51
|
|
|
50
52
|
const handleClick = ({ index }) => {
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { NavLink, Redirect } from 'react-router-dom';
|
|
4
|
+
import { useEffect } from 'react';
|
|
4
5
|
|
|
5
6
|
import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
|
|
6
7
|
|
|
7
8
|
import cx from 'classnames';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
|
|
11
|
+
const scrollToFirstTabContent = () => {
|
|
12
|
+
const firstTabContent = document.querySelector('.tab-content');
|
|
13
|
+
if (firstTabContent) {
|
|
14
|
+
firstTabContent.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
10
18
|
function CclTab(props) {
|
|
11
19
|
let {
|
|
12
20
|
activeTab,
|
|
@@ -22,9 +30,15 @@ function CclTab(props) {
|
|
|
22
30
|
} = props;
|
|
23
31
|
const token = useSelector((state) => state.userSession?.token);
|
|
24
32
|
function onTabClick(e) {
|
|
33
|
+
scrollToFirstTabContent();
|
|
25
34
|
onClick(tabId);
|
|
26
35
|
}
|
|
27
36
|
const [redirecting, setRedirecting] = React.useState(false);
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
scrollToFirstTabContent();
|
|
40
|
+
}, [activeTab]);
|
|
41
|
+
|
|
28
42
|
return (
|
|
29
43
|
<div
|
|
30
44
|
className={cx('card ' + className, activeTab === tabId ? 'active ' : '')}
|