Skip to content

Commit

Permalink
Corrected the rendering of custom JSON config components
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Dec 10, 2024
1 parent 000ac03 commit beda8a8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ The icons may not be reused in other projects without the proper flaticon licens
<!--
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**

- (@GermanBluefox) Corrected the rendering of custom JSON config components

### 7.4.4 (2024-12-08)

- (@GermanBluefox) Showed value in object edit dialog
Expand Down
4 changes: 2 additions & 2 deletions packages/adapter-react-v5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want to create the configuration page with ReactJS:
- Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
- Add to devDependencies:
```json
"@iobroker/adapter-react-v5": "^7.4.3",
"@iobroker/adapter-react-v5": "^7.4.4",
```
Versions can be higher.
So your `src/package.json` should look like:
Expand All @@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
"version": "0.1.0",
"private": true,
"dependencies": {
"@iobroker/adapter-react-v5": "^7.4.3",
"@iobroker/adapter-react-v5": "^7.4.4",
"@iobroker/build-tools": "^1.0.0",
"babel-eslint": "^10.1.0",
"react-scripts": "^5.0.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/admin/src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@
}
]
],
"version": "7.4.3"
}
"version": "7.4.4"
}
14 changes: 13 additions & 1 deletion packages/jsonConfig/src/JsonConfigComponent/ConfigCustom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,18 @@ export default class ConfigCustom extends ConfigGeneric<ConfigCustomProps, Confi
return item;
}

return <CustomComponent {...this.props} />;
return (
<CustomComponent
{...this.props}
// @ts-expect-error BF (2024-12-18) Remove after the 7.4 will be mainstream. All following lines
socket={this.props.oContext.socket}
theme={this.props.oContext.theme}
themeType={this.props.oContext.themeType}
instance={this.props.oContext.instance}
adapterName={this.props.oContext.adapterName}
systemConfig={this.props.oContext.systemConfig}
forceUpdate={this.props.oContext.forceUpdate}
/>
);
}
}

0 comments on commit beda8a8

Please sign in to comment.