Hi there:
I have the following code:
winRefBuilder = (win) => {
this.window = win;
}
componentDidMount() {
this.window.on('close', () => {
this.props.closing();
});
}
componentDidUpdate (prevProps, prevState) {
if (prevProps.open !== this.props.open && this.props.open) {
this.window.showCloseButton(true); // <-----
this.window.open();
}
if (prevProps.editing !== this.props.editing) {
/* ... editing is an object that contains the values to show in the body of the window, lets say:
this.input1.val(this.props.editing.value1);
this.input2.val(this.props.editing.value2);
*/
}
}
render(){
return (<JqxWindow
ref={this.winRefBuilder} isModal resizable={false} autoOpen={false} width={800} height={600}>
<div>{'This is my title'}</div>
<div>
// ... this is the body with two JqxInput
</div>
</JqxWindow>);
The closing
prop is a function from the parent component, which is:
closing = () => {
this.setState({open: false});
}
If editing
prop does not exist everything works fine, but if editing
prop exists then the tinny X from the right upper corner disappears for good, no matter the contents in editing
. Note that I’m trying to force the X to show, but it does not. What am I missing here?