lidorsystems / integralui-web-angular

IntegralUI Web - Advanced UI Components for Angular 9
https://www.lidorsystems.com/products/web/studio/
Other
10 stars 8 forks source link

How to set expand timeout in TreeView component? #23

Closed mm-ryo closed 3 years ago

mm-ryo commented 3 years ago

Hi, I saw there is a property "expandTimeout" in integralui.treeview.d.ts file. but it didn't expose to the public.

The problem is the tree item expanding so fast while moving entity over it.

Could you expose this property to public in coming release? then i can set a proper value for this.

Thanks

Lidor-Systems commented 3 years ago

Its not wise to expose that variable as public. Anyway, even if exposed you cannot change the delay of the timeout that way.

As a solution, we can create a property named expandDelay where you can set up how fast the parent node will expand when hovered during drag process. By default, this delay is set to 500ms.

Lidor-Systems commented 3 years ago

In meantime you can solve this on your side by editing the integralui.treeview.js file. Search for this string:

clearTimeout(t.expandTimeout)},500)

Change the 500ms to any other value. For example to have auto-expand after 2 seconds, change that string to:

clearTimeout(t.expandTimeout)},2000)