Skip to content

Conversation

williamhector
Copy link

@williamhector williamhector commented Jul 25, 2019

Example:

{{#x-tree model=tree checkable=true recursiveCheck=true as |node|}}
    <span class="node-checkbox {{if node.model.isChecked 'checked'}}" onclick={{action node.toggleCheck}}></span>
    <span class="branch-toggle {{if node.model.isExpanded 'open'}}" {{action node.toggleExpand}}></span>
    {{node.model.name}}
{{/x-tree}}

In order to support custom checkbox and expand icons, an alternative approach to this PR would be to allow implementing apps to toggle checkboxes and branch expansion by adding an onExpanded action, and to run recursive checkbox updates from manual model.isChecked updates instead of only from checkbox click actions.
If this PR is rejected, is that alternative approach preferred?

Technowl and others added 3 commits July 26, 2019 09:04
…d actions through the block yield hash.

Example:
{{#x-tree model=tree checkable=true recursiveCheck=true as |node|}}
    <span class="node-checkbox {{if node.model.isChecked 'checked'}}" onclick={{action node.toggleCheck}}></span>
    <span class="branch-toggle {{if node.model.isExpanded 'open'}}" {{action node.toggleExpand}}></span>
    {{node.model.name}}
{{/x-tree}}
Fixed linting issues
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

Successfully merging this pull request may close these issues.

2 participants