BS4 display HOT table in modal

Tags: #<Tag:0x00007f8b23ed7cd0>

Hi,

I’m having troubles using Handsontable in a modal dialog (BS4). In body container this is working fine.
See below:

Once the modal dialog opened, when I click on the table cell, it refreshes the whole table and then it displays.
Is there a way to do this properly using Handsontable options ?

Is used HOT’s demo codesandbox to build the table.
Thank you

Hi @Trouyt

Could you try if adding the render() method to the instance of Handsontable solves the issue?
When we click on the top-left border table appears. It means that the table has to be repainted to show.
What some of our users do is to call the rendering with a small delay such as

setTimeout(function() {
   instance_of_handontable.render();
}, 100);

Hi @aleksandra_budnik,

This is giving a first answer to my issue.
However, how shoud I manage the timeout length if my data or data treatement is that heavy that it takes more than 100ms for example ?

Thank you for your prompt message.

You can experiment with that value of milliseconds. It is needed to give Handsontable a hint that it is being loaded in a container that does not have a set width/height.

Ok thank you for the advice, I think you can close this topic.

Have a nice day !

Great. If you would need anything more than that please let me know.