@jetbrains/ring-ui 4.1.27 → 4.1.28

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.
@@ -29,10 +29,13 @@ class SmartTable extends PureComponent {
29
29
  };
30
30
 
31
31
  UNSAFE_componentWillReceiveProps(nextProps) {
32
- const {data, isItemSelectable} = nextProps;
33
- if (this.props.data !== data || this.props.isItemSelectable !== isItemSelectable) {
34
- const selection = new Selection({data, isItemSelectable});
32
+ const {data, isItemSelectable, selection} = nextProps;
33
+ if (this.props.remoteSelection && this.props.selection !== selection) {
35
34
  this.setState({selection});
35
+ } else if (this.props.data !== data || this.props.isItemSelectable !== isItemSelectable) {
36
+ this.setState({
37
+ selection: new Selection({data, isItemSelectable})
38
+ });
36
39
  }
37
40
  }
38
41
 
@@ -85,17 +85,21 @@ class SmartTable extends PureComponent {
85
85
  UNSAFE_componentWillReceiveProps(nextProps) {
86
86
  const {
87
87
  data,
88
- isItemSelectable
88
+ isItemSelectable,
89
+ selection
89
90
  } = nextProps;
90
91
 
91
- if (this.props.data !== data || this.props.isItemSelectable !== isItemSelectable) {
92
- const selection = new Selection({
93
- data,
94
- isItemSelectable
95
- });
92
+ if (this.props.remoteSelection && this.props.selection !== selection) {
96
93
  this.setState({
97
94
  selection
98
95
  });
96
+ } else if (this.props.data !== data || this.props.isItemSelectable !== isItemSelectable) {
97
+ this.setState({
98
+ selection: new Selection({
99
+ data,
100
+ isItemSelectable
101
+ })
102
+ });
99
103
  }
100
104
  }
101
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "4.1.27",
3
+ "version": "4.1.28",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -221,5 +221,5 @@
221
221
  "node": ">=7.4",
222
222
  "npm": ">=6.0.0"
223
223
  },
224
- "gitHead": "91ee90ef36ff1b781a040d70e62da7eed0e9f960"
224
+ "gitHead": "9c606e0eacffbd1a127f595173026e100e48671e"
225
225
  }