10000 Reorder props to avoid TS error · thisiscam/esp8266-react@5269b47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5269b47

Browse files
committed
Reorder props to avoid TS error
1 parent c1fdb9b commit 5269b47

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

interface/src/components/RestController.tsx

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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)
0