Skip to content

Commit 49dfd5e

Browse files
authored
Added missing id and key props (equinor#248)
* Added missing ID and key props.
1 parent 1988830 commit 49dfd5e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- [#219](https://github.com/equinor/webviz-core-components/pull/219) - Implemented components required by the new Webviz Layout Framework (WLF)
2121
- [#227](https://github.com/equinor/webviz-core-components/pull/227) - Added `EdsIcon` component in order to use icons from the Equinor Design System (EDS) directly in Python.
2222
- [#240](https://github.com/equinor/webviz-core-components/pull/240) - States of menu, active view, settings drawer and settings groups are getting stored now. If no URL path is given, the one of the first page is opened now.
23+
- [#248](https://github.com/equinor/webviz-core-components/pull/248) - Added missing `id` in `WebvizSettingsGroup` and `key` in `WebvizViewList` (for view groups).
2324

2425
### Changed
2526

react/src/lib/components/WebvizSettingsDrawer/components/ViewList/view-list.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ export const ViewList: React.FC<ViewListProps> = (props: ViewListProps) => {
126126
);
127127
} else {
128128
return (
129-
<div className="WebvizViewList__Group">
129+
<div
130+
className="WebvizViewList__Group"
131+
key={el.group}
132+
>
130133
<div className="WebvizViewList__GroupTitle">
131134
{el.group}
132135
</div>

react/src/lib/components/WebvizSettingsGroup/WebvizSettingsGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export const WebvizSettingsGroup: React.FC<WebvizSettingsGroupProps> = (
133133

134134
return (
135135
<div
136+
id={props.id}
136137
className="WebvizSettingsGroup"
137138
style={{ display: visible ? "block" : "none" }}
138139
>

0 commit comments

Comments
 (0)