简体   繁体   中英

DHTMLX Gantt does not render in background bootstrap tab

After upgrading from 4.1 version of DHTMLX Gantt to 5.2 I encountered a problem with rendering the chart in a 'hidden' non-active bootstrap tab. Even though div has HTML attribute width and height defined, the javascript height property returns 0 height. I tried to render gantt chart again on onclick event of a tab switch button, but it seems that transition effect does not display the div soon enough, so it only renders the gantt chart on the second button click, when the div is already displayed.

Did anyone solved this issue without writing an shown.bs.tab event listener?

The problem should be fixed in gantt v6+ https://docs.dhtmlx.com/gantt/whatsnew.html#x3174x60x3175x Gantt now listens to its html container resize automatically.

Although, you may need settings min-height for gantt element if it doesn't have height specified.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM