jQuery UI Widgets Forums React Problem with the tree

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 4 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Problem with the tree #97950

    assembler
    Participant

    I hope I make myself understandable this time:

    I’m using a JqxTree which is created on-demand. The way I populate the tree is giving the nodes one by one to a parent node. If I scroll up and down the tree or left and right it shows me a blank space. I found a solution that seems to work in the vertical scroll, but not the horizontal scroll. As shown in this image: https://drive.google.com/open?id=1rrAtGLyRuYp1mr1i0OP1eBU94tIqoMwx

    The solution is removing the height, the width and the ax-width styles from everywhere I find an element that starts with panelContentpaneljqxTree in the DOM. Like this:

    window.$('div[id^="panelContentpaneljqxTree"]').css({'height': '', 'width': '', 'max-width': ''});

    The max-width style keeps showing. Now, if I do this:

    setInterval(() => {
       window.$('div[id^="panelContentpaneljqxTree"]').css({'height': '', 'width': '', 'max-width': ''});
    }, 1000);

    It solves the problem, but I think to use setInterval in this case is discouraged. So, how can I avoid this to happen?

    • This topic was modified 4 years, 9 months ago by  assembler.
    Problem with the tree #98016

    Hristo
    Participant

    Hello assembler,

    Could you clarify your issue?
    We have a work item for missing vertical and horizontal scrollbar.
    You could try to use the created from you workaround with “setTimeout” instead of “setInterval”, this will happen just once.
    Also, I would like to suggest you workaround – you could include the jqxTree inside of another widget. Please, take a look at this demo:
    https://www.jqwidgets.com/react/react-tree/react-tree-defaultfunctionality.htm

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.