@iobroker/adapter-react-v5 6.0.15 → 6.0.16
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/Components/ObjectBrowser.js +10 -5
- package/README.md +1 -1
- package/package.json +1 -1
|
@@ -2587,8 +2587,9 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2587
2587
|
* @param isDouble is double click
|
|
2588
2588
|
*/
|
|
2589
2589
|
onAfterSelect(isDouble) {
|
|
2590
|
+
var _b;
|
|
2590
2591
|
this.lastSelectedItems = [...this.state.selected];
|
|
2591
|
-
if (this.state.selected
|
|
2592
|
+
if ((_b = this.state.selected) === null || _b === void 0 ? void 0 : _b.length) {
|
|
2592
2593
|
this.localStorage.setItem(`${this.props.dialogName || 'App'}.objectSelected`, JSON.stringify(this.lastSelectedItems));
|
|
2593
2594
|
if (this.lastSelectedItems.length === 1 && this.objects[this.lastSelectedItems[0]]) {
|
|
2594
2595
|
const name = this.lastSelectedItems.length === 1
|
|
@@ -2598,7 +2599,8 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2598
2599
|
}
|
|
2599
2600
|
}
|
|
2600
2601
|
else {
|
|
2601
|
-
this.localStorage.
|
|
2602
|
+
this.localStorage.removeItem(`${this.props.dialogName || 'App'}.objectSelected`);
|
|
2603
|
+
this.selectedFound = true;
|
|
2602
2604
|
if (this.state.selected.length) {
|
|
2603
2605
|
this.setState({ selected: [] }, () => this.props.onSelect && this.props.onSelect([], ''));
|
|
2604
2606
|
}
|
|
@@ -5038,15 +5040,18 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
5038
5040
|
* Called when component is updated.
|
|
5039
5041
|
*/
|
|
5040
5042
|
componentDidUpdate() {
|
|
5041
|
-
var _b, _c, _d, _e;
|
|
5043
|
+
var _b, _c, _d, _e, _f, _g;
|
|
5044
|
+
if (!this.selectedFound && !((_b = this.state.selected) === null || _b === void 0 ? void 0 : _b.length) && !((_c = this.lastSelectedItems) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
5045
|
+
this.selectedFound = true;
|
|
5046
|
+
}
|
|
5042
5047
|
if (this.tableRef.current) {
|
|
5043
5048
|
const scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
|
|
5044
5049
|
if (this.state.scrollBarWidth !== scrollBarWidth) {
|
|
5045
5050
|
setTimeout(() => this.setState({ scrollBarWidth }), 100);
|
|
5046
5051
|
}
|
|
5047
5052
|
else if (!this.selectedFound &&
|
|
5048
|
-
(((
|
|
5049
|
-
this.scrollToItem(((
|
|
5053
|
+
(((_d = this.state.selected) === null || _d === void 0 ? void 0 : _d[0]) || ((_e = this.lastSelectedItems) === null || _e === void 0 ? void 0 : _e[0]))) {
|
|
5054
|
+
this.scrollToItem(((_f = this.state.selected) === null || _f === void 0 ? void 0 : _f[0]) || ((_g = this.lastSelectedItems) === null || _g === void 0 ? void 0 : _g[0]));
|
|
5050
5055
|
}
|
|
5051
5056
|
}
|
|
5052
5057
|
}
|
package/README.md
CHANGED
|
@@ -781,7 +781,7 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
|
|
|
781
781
|
-->
|
|
782
782
|
|
|
783
783
|
## Changelog
|
|
784
|
-
### 6.0.
|
|
784
|
+
### 6.0.16 (2024-07-14)
|
|
785
785
|
* (bluefox) Allowed playing mp3 files in the file browser
|
|
786
786
|
* (bluefox) Corrected jump by object selection
|
|
787
787
|
|