Hello,
Can't really find the proper way to close a drawer programatically in the react demo.
There is nothing in the docs about drawers and the KTDrawer seen in the HTML docs apparantly is not available in react. What would be the right way to close a drawer from a function?
Thank you!
Hi,
Mostly js drawer component in the HTML version is the same as a ts drawer component in react version. We will consider adding documentation for typescript components in upcoming releases.
Since the biggest part of the HTML, drawer components is the same as react drawer, for now, you can refer to the HTML version's drawer doc, also if you have any questions regarding our components you can ask them here.
To close the drawer in the function you can call a hide function of DrawerComponent instance.
const closeDrawer = () => {
DrawerComponent.getInstance("kt_drawer_chat")?.hide();
};
Hi Lauris,
My question was concerning react but your answer did solve the issue. Thank you!