Browse Source
Merge pull request #147 from rjwats/ts-fixes
Reorder props to avoid TS error
master
rjwats
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
interface/src/components/RestController.tsx
-
interface/src/components/WebSocketController.tsx
|
|
@ -100,12 +100,12 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl: |
|
|
|
|
|
|
|
render() { |
|
|
|
return <RestController |
|
|
|
{...this.props as P} |
|
|
|
{...this.state} |
|
|
|
handleValueChange={this.handleValueChange} |
|
|
|
setData={this.setData} |
|
|
|
saveData={this.saveData} |
|
|
|
loadData={this.loadData} |
|
|
|
{...this.state} |
|
|
|
{...this.props as P} |
|
|
|
/>; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -119,13 +119,13 @@ export function webSocketController<D, P extends WebSocketControllerProps<D>>(ws |
|
|
|
|
|
|
|
render() { |
|
|
|
return <WebSocketController |
|
|
|
{...this.props as P} |
|
|
|
handleValueChange={this.handleValueChange} |
|
|
|
setData={this.setData} |
|
|
|
saveData={this.saveData} |
|
|
|
saveDataAndClear={this.saveDataAndClear} |
|
|
|
connected={this.state.connected} |
|
|
|
data={this.state.data} |
|
|
|
{...this.props as P} |
|
|
|
/>; |
|
|
|
} |
|
|
|
|
|
|
|