Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to have custom field other than "label" and "children"? #111

Open
nasr18 opened this issue Nov 19, 2016 · 2 comments
Open

Comments

@nasr18
Copy link

nasr18 commented Nov 19, 2016

No description provided.

@chriscohoat
Copy link

As far as I can tell it's possible but you need to modify the directive itself.

I needed to add a count next to the label so I modified abn_tree_directive and the template like so:

...<span class=\"indented tree-label\">{{ row.label }} </span><span class='count'>{{ row.count }}</span></a>...

And modified the scope.tree_rows call to include the count as well:

scope.tree_rows.push({
    level: level,
    branch: branch,
    label: branch.label,
    count: branch.count,
    classes: branch.classes,
    tree_icon: tree_icon,
    visible: visible
});

Not ideal, but is a quick way to get it working.

@ruisilva450
Copy link

@chriscohoat you should PR that.
It's just what I wanted! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants