I recently upgraded the react and react-dom version of my application from 16.4.1 to 17.0.1. I have the following piece of code in which the function is not getting called when the button is clicked. The same function gets called when I do not transform the component into a kendo window through jquery. So please help me with what I am missing here.
You can find the stackblitz for the code here.
You can also find the code below
import React from "react";
import ReactDOM from "react-dom";
import $ from "jquery";
import "kendo-ui-core";
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
visible: true
};
this.toggleDialog = this.toggleDialog.bind(this);
}
toggleDialog() {
console.log("hi");
}
render() {
return (
<div id="Notification-Popup">
<button className="k-button" onClick={this.toggleDialog}>
Open Window
</button>
</div>
);
}
componentDidMount() {
const popup = $("#Notification-Popup");
popup.kendoWindow({
actions: [],
width: 450,
height: 520,
visible: true,
modal: true,
title: "Notification",
resizable: false
});
}
}
$("body").append(
'<div id="SubscriptionExpirationNotificationPopupContainer"></div>'
);
ReactDOM.render(
<App />,
document.getElementById("SubscriptionExpirationNotificationPopupContainer")
);