@jetbrains/ring-ui 6.0.73 → 6.0.74

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.
@@ -162,9 +162,14 @@ export default class List extends Component {
162
162
  if (this.virtualizedList && prevProps.data !== this.props.data) {
163
163
  this.virtualizedList.recomputeRowHeights();
164
164
  }
165
+ const { activeIndex } = this.state;
166
+ const isActiveItemRetainedPosition = activeIndex
167
+ ? prevProps.data[activeIndex]?.key === this.props.data[activeIndex]?.key
168
+ : false;
165
169
  if (this.props.activeIndex == null &&
166
170
  getDataHash(this.props.data) !== getDataHash(prevProps.data) &&
167
- shouldActivateFirstItem(this.props)) {
171
+ shouldActivateFirstItem(this.props) &&
172
+ !isActiveItemRetainedPosition) {
168
173
  this.activateFirst();
169
174
  }
170
175
  this.checkOverflow();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "6.0.73",
3
+ "version": "6.0.74",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",