Skip to content

Commit 88748ac

Browse files
authored
Merge pull request #147 from rjwats/ts-fixes
Reorder props to avoid TS error
2 parents c1fdb9b + 5269b47 commit 88748ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

interface/src/components/RestController.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ export function restController<D, P extends RestControllerProps<D>>(endpointUrl:
100100

101101
render() {
102102
return <RestController
103+
{...this.props as P}
104+
{...this.state}
103105
handleValueChange={this.handleValueChange}
104106
setData={this.setData}
105107
saveData={this.saveData}
106108
loadData={this.loadData}
107-
{...this.state}
108-
{...this.props as P}
109109
/>;
110110
}
111111

interface/src/components/WebSocketController.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ export function webSocketController<D, P extends WebSocketControllerProps<D>>(ws
119119

120120
render() {
121121
return <WebSocketController
122+
{...this.props as P}
122123
handleValueChange={this.handleValueChange}
123124
setData={this.setData}
124125
saveData={this.saveData}
125126
saveDataAndClear={this.saveDataAndClear}
126127
connected={this.state.connected}
127128
data={this.state.data}
128-
{...this.props as P}
129129
/>;
130130
}
131131

0 commit comments

Comments
 (0)