Commit a6945e8
authored
Only unbind events passed from the parent component (#613)
`initEchartsInstance` attached a handler for the `"finish"` event. If
`componentDidUpdate` is called between attaching the handler, and firing
the handler and the `onEvents` prop changed, this will fire
`"offEvents"` which will remove the handler for the `"finish"` event.
This means the finish handler never fires, so the chart auto-resize is
not attached, and the ready event handler never fires.
Instead, only remove the events that are on the previous props, and
leave the `"finish"` callback alone.1 parent 3739822 commit a6945e8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
0 commit comments