Our pure JavaScript Scheduler component


Post by besch1980 »

Hi saki,

according to your advice, I simplified the testcase. I used the "tasks example" with a small amount of data and added one more column to schedulerConfig.ts

{
            text      : 'Status',
            width     : '5em',
           
renderer({record}) {return record.status; } }

Please see my attached data.json file and have a look into the "tasks example". If scheduler has been started, everything is fine. Everything looks good and seems to be the expected result. After folding and expanding the tree elements or sorting (no custom sorters anymore) the data gets mixed up. i.e. data from column Status becomes suddenly part of the tree element and that's not correct.

Attachments
data.json
(6.02 KiB) Downloaded 110 times

Post by saki »

Would you please spot the second(s) in the following video where I can observe the unwanted behavior? The data is unsorted so it sometimes seems like that some children are not wrapped in its parent.

Attachments
tree.mov.zip
(3.13 MiB) Downloaded 112 times

Post by besch1980 »

Hi saki,

from second 21 on, you can see the problem. After you folded every "root element" and unfold it again afterwards, the string "TEST" now occours in an unfolded child row. This unwanted behaviour continues after each element you unfold.

best regards,
Ben

Attachments
2.PNG
2.PNG (112.76 KiB) Viewed 926 times
1.PNG
1.PNG (158.09 KiB) Viewed 926 times

Post by saki »

The problem here is that the renderer returns undefined if the status field is missing in the data. You can use any of the following:

{
    text      : 'Status',
    width     : '5em',
    field     : 'status'
}

or

{
    text      : 'Status',
    width     : '5em',
    renderer({record}) {
        return record.status || ''; 
    }  
}

Post by besch1980 »

Hi saki,

thanks a lot! That solvwed my issues.

Have a nice day,
Ben


Post Reply