File tree Expand file tree Collapse file tree
packages/plugin-datasource-pane/src/pane Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ export interface DataSource {
3232 list : InterpretDataSourceConfig [ ] ;
3333}
3434
35- const stateService = createStateService ( ) ;
36-
3735export { DataSourceForm } from '../components/DataSourceForm' ;
3836
3937const PLUGIN_NAME = 'dataSourcePane' ;
@@ -83,6 +81,8 @@ export default class DataSourcePanePlugin extends PureComponent<
8381 exportPlugins : [ ] ,
8482 } ;
8583
84+ stateService = createStateService ( ) ;
85+
8686 state = {
8787 active : false ,
8888 panelKey : 1 ,
@@ -110,11 +110,11 @@ export default class DataSourcePanePlugin extends PureComponent<
110110 }
111111
112112 componentDidMount ( ) {
113- stateService . start ( ) ;
113+ this . stateService . start ( ) ;
114114 }
115115
116116 componentWillUnmount ( ) {
117- stateService . stop ( ) ;
117+ this . stateService . stop ( ) ;
118118 }
119119
120120 handleSchemaChange = ( schema : DataSource ) => {
@@ -166,7 +166,7 @@ export default class DataSourcePanePlugin extends PureComponent<
166166 return (
167167 < EditorContext . Provider value = { { project, logger, setters } } >
168168 < DataSourcePaneContext . Provider
169- value = { { stateService, dataSourceTypes } }
169+ value = { { stateService : this . stateService , dataSourceTypes } }
170170 >
171171 < ErrorBoundary
172172 onError = { onError }
You can’t perform that action at this time.
0 commit comments