Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
Merge pull request #948 from ironmansoftware/946
Browse files Browse the repository at this point in the history
Fixes #946
  • Loading branch information
adamdriscoll authored Jul 6, 2019
2 parents 7ae6a93 + e02e775 commit c5c4ef2
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/client/src/app/ud-treeview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,32 @@ export default class UDTreeView extends React.Component {

onToggle(node, toggled)
{
fetchPost('/api/internal/component/element/' + this.props.id, { nodeId: node.id}, function(data) {
node.children = data;

if (this.props.hasCallback) {
fetchPost('/api/internal/component/element/' + this.props.id, { nodeId: node.id}, function(data) {
node.children = data;
if(this.state.cursor){this.state.cursor.active = false;}

node.active = true;

if(node.children){
node.toggled = toggled;
}

this.setState({ cursor: node })

}.bind(this))
}
else {
if(this.state.cursor){this.state.cursor.active = false;}

node.active = true;

if(node.children){
node.toggled = toggled;
}

this.setState({ cursor: node })

}.bind(this))
}


}

render(){
Expand Down

0 comments on commit c5c4ef2

Please sign in to comment.