@iobroker/adapter-react-v5 7.4.7 → 7.4.9
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/README.md +2 -2
- package/build/Components/ObjectBrowser.d.ts +3 -1
- package/build/Components/ObjectBrowser.js +5 -0
- package/build/Components/ObjectBrowser.js.map +1 -1
- package/build/Dialogs/SelectID.d.ts +4 -2
- package/build/Dialogs/SelectID.js +1 -1
- package/build/Dialogs/SelectID.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
|
|
|
13
13
|
- Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
|
|
14
14
|
- Add to devDependencies:
|
|
15
15
|
```json
|
|
16
|
-
"@iobroker/adapter-react-v5": "^7.4.
|
|
16
|
+
"@iobroker/adapter-react-v5": "^7.4.9",
|
|
17
17
|
```
|
|
18
18
|
Versions can be higher.
|
|
19
19
|
So your `src/package.json` should look like:
|
|
@@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
|
|
|
24
24
|
"version": "0.1.0",
|
|
25
25
|
"private": true,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@iobroker/adapter-react-v5": "^7.4.
|
|
27
|
+
"@iobroker/adapter-react-v5": "^7.4.9",
|
|
28
28
|
"@iobroker/build-tools": "^1.0.0",
|
|
29
29
|
"babel-eslint": "^10.1.0",
|
|
30
30
|
"react-scripts": "^5.0.1"
|
|
@@ -217,7 +217,7 @@ export interface ObjectBrowserProps {
|
|
|
217
217
|
dialogName?: string;
|
|
218
218
|
defaultFilters?: ObjectBrowserFilter;
|
|
219
219
|
selected?: string | string[];
|
|
220
|
-
onSelect?: (selected: string | string[], name: string, isDouble?: boolean) => void;
|
|
220
|
+
onSelect?: (selected: string | string[], name: string | null, isDouble?: boolean) => void;
|
|
221
221
|
onFilterChanged?: (newFilter: ObjectBrowserFilter) => void;
|
|
222
222
|
socket: Connection;
|
|
223
223
|
showExpertButton?: boolean;
|
|
@@ -237,6 +237,8 @@ export interface ObjectBrowserProps {
|
|
|
237
237
|
isFloatComma?: boolean;
|
|
238
238
|
dateFormat?: string;
|
|
239
239
|
levelPadding?: number;
|
|
240
|
+
/** Allow selection of non-objects (virtual branches) */
|
|
241
|
+
allowNonObjects?: boolean;
|
|
240
242
|
objectCustomDialog?: React.FC<ObjectCustomDialogProps>;
|
|
241
243
|
objectAddBoolean?: boolean;
|
|
242
244
|
objectEditBoolean?: boolean;
|
|
@@ -2278,6 +2278,11 @@ export class ObjectBrowserClass extends Component {
|
|
|
2278
2278
|
this.props.onSelect(this.state.selected, name, isDouble);
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
+
else if (this.state.selected.length === 1 && this.props.allowNonObjects) {
|
|
2282
|
+
if (this.props.onSelect) {
|
|
2283
|
+
this.props.onSelect(this.state.selected, null, isDouble);
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2281
2286
|
}
|
|
2282
2287
|
else {
|
|
2283
2288
|
this.localStorage.removeItem(`${this.props.dialogName || 'App'}.objectSelected`);
|