Merge pull request #147 from rjwats/ts-fixes
Reorder props to avoid TS error
This commit is contained in:
commit
88748ac30d
@ -100,12 +100,12 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl:
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <RestController
|
return <RestController
|
||||||
|
{...this.props as P}
|
||||||
|
{...this.state}
|
||||||
handleValueChange={this.handleValueChange}
|
handleValueChange={this.handleValueChange}
|
||||||
setData={this.setData}
|
setData={this.setData}
|
||||||
saveData={this.saveData}
|
saveData={this.saveData}
|
||||||
loadData={this.loadData}
|
loadData={this.loadData}
|
||||||
{...this.state}
|
|
||||||
{...this.props as P}
|
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,13 +119,13 @@ export function webSocketController<D, P extends WebSocketControllerProps<D>>(ws
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <WebSocketController
|
return <WebSocketController
|
||||||
|
{...this.props as P}
|
||||||
handleValueChange={this.handleValueChange}
|
handleValueChange={this.handleValueChange}
|
||||||
setData={this.setData}
|
setData={this.setData}
|
||||||
saveData={this.saveData}
|
saveData={this.saveData}
|
||||||
saveDataAndClear={this.saveDataAndClear}
|
saveDataAndClear={this.saveDataAndClear}
|
||||||
connected={this.state.connected}
|
connected={this.state.connected}
|
||||||
data={this.state.data}
|
data={this.state.data}
|
||||||
{...this.props as P}
|
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user