he-tree icon indicating copy to clipboard operation
he-tree copied to clipboard

Filtering/Searching

Open sanjogs opened this issue 3 years ago • 6 comments

How do we achieve filtering/searching feature like in the he-tree-vue.

I am trying to walk the tree data, but i am unable to set the hidden prop of the node. Is there any example for that?

sanjogs avatar Sep 09 '22 21:09 sanjogs

import * as hp from "helper-js";

hp.walkTreeData(
  stat,
  (childStat, index, parent, path) => {
    childStat.hidden = false;
  },
  { childrenKey: "children" }
);

phphe avatar Sep 13 '22 16:09 phphe

Thanks @phphe, I implemented something similar. I tried implementing filter functionality using the he-tree-vue and this new he-tree as well. The performance of new version is significantly lagging compared to the old version when searching. Is there any known performance lag when rendering, or could it be my implementation. This is my implementation using he-tree-vue https://gist.github.com/sanjogs/6ae0ecc33bed0c762e5a0652b3da4d39 Here is the treeview component i created https://gist.github.com/sanjogs/7ed22302dc69ca7ca6c84e09e19535c5

and this one is the new version https://gist.github.com/sanjogs/6ae0ecc33bed0c762e5a0652b3da4d39

Could you please advise what may be causing the performance lag when searching? Thanks

sanjogs avatar Sep 13 '22 17:09 sanjogs

Maybe you can try close vue devtools.

phphe avatar Sep 13 '22 23:09 phphe

The issue exists in production build with dev tools disabled as well.

sanjogs avatar Sep 14 '22 12:09 sanjogs

Could you provide a reproduce?

phphe avatar Sep 14 '22 14:09 phphe

I played around with my template and saw that font awesome icons is causing the lag. But I have same template for the older tree view and that's no problem. It will take me a while to prepare the reproduce. I will post here when I'm able to. Thanks

On Wed, Sep 14, 2022, 10:36 AM Xinxin @.***> wrote:

Could you provide a reproduce?

— Reply to this email directly, view it on GitHub https://github.com/phphe/he-tree/issues/32#issuecomment-1246864851, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADABBTZIZKCNWJW3IPKF4XDV6HPHLANCNFSM6AAAAAAQJAPD2M . You are receiving this because you authored the thread.Message ID: @.***>

sanjogs avatar Sep 14 '22 15:09 sanjogs