@@ -60,14 +60,14 @@ define((require) => {
6060 }
6161
6262 UNSAFE_componentWillReceiveProps ( nextProps ) {
63- this . disconnectFromPython ( ) ;
64- this . id = ( nextProps . id === undefined ) ? nextProps . model : nextProps . id ;
65-
66- GEPPETTO . ComponentFactory . addExistingComponent ( this . state . componentType , this ) ;
67- this . connectToPython ( this . state . componentType , nextProps . model ) ;
68- if ( this . state . value !== nextProps . value ) {
69- this . setState ( { value : ( nextProps . value === undefined ) ? '' : nextProps . value } ) ;
70- }
63+ // this.disconnectFromPython();
64+ // this.id = (nextProps.id === undefined) ? nextProps.model : nextProps.id;
65+
66+ // GEPPETTO.ComponentFactory.addExistingComponent(this.state.componentType, this);
67+ // this.connectToPython(this.state.componentType, nextProps.model);
68+ // if (this.state.value !== nextProps.value) {
69+ // this.setState({ value: (nextProps.value === undefined) ? '' : nextProps.value });
70+ // }
7171 }
7272
7373 componentDidMount ( ) {
@@ -114,20 +114,20 @@ define((require) => {
114114 * with this.props.default
115115 */
116116 UNRELIABLE_SyncDefaultValueWithPython ( timeInterval = 600 , attemps = 0 ) {
117- if ( attemps < 3 ) {
118- setTimeout ( ( ) => {
119- if ( this . props . default && this . state . value === '' ) {
120- if ( this . syncValueWithPython ) {
121- // this function is added by jupyter_geppetto after the component is synched with python
122- this . syncValueWithPython ( this . props . default ) ;
123- } else {
124- this . UNRELIABLE_SyncDefaultValueWithPython ( timeInterval * 2 , attemps + 1 ) ;
125- }
126- }
127- } , timeInterval ) ;
128- } else {
129- console . warn ( `Tried to sync default value for ${ this . props . model } and failed after 3 attempts.` ) ;
130- }
117+ // if (attemps < 3) {
118+ // setTimeout(() => {
119+ // if (this.props.default && this.state.value === '') {
120+ // if (this.syncValueWithPython) {
121+ // // this function is added by jupyter_geppetto after the component is synched with python
122+ // this.syncValueWithPython(this.props.default);
123+ // } else {
124+ // this.UNRELIABLE_SyncDefaultValueWithPython(timeInterval * 2, attemps + 1);
125+ // }
126+ // }
127+ // }, timeInterval);
128+ // } else {
129+ // console.warn(`Tried to sync default value for ${this.props.model} and failed after 3 attempts.`);
130+ // }
131131 }
132132
133133 UNSAFE_componentWillReceiveProps ( nextProps ) {
0 commit comments