how is the index of a task is calculated?

Hi ,

How is the index of a task is calculated?

by default the index is an order of task in a ‘data’ array of a dataset. Then the index is stored in some internal structure and may be changed during the app work.
Can you please clarify the question, do you need to calculate index for some reason?

I am trying to change the working of the add button

check out this link

what is happening is after adding 100 tasks adding task at the root levels makes me scroll up at the top of the page everytime.

what i intend to do is when i click on the add button, if i select the parent in the dropdown, the task is to be added at the root element level

have a look at the snippet’s lightbox for the level of the task.