JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<ul id="treev" class="easyui-tree" data-options="animate:true,checkbox:true">
</ul>

JavaScript

var data = [{"id":1,"text":"Régate démo 1","attributes":{"info":"Régate d'hiver dans la baie d'Hyères\n du 2014-01-01 au 2014-01-15\n Organisé par:Hyères Plaisance Organisation","table":"phpboost_regate","idDb":"2"},"state":"closed"},{"id":2,"text":"Régate démo 2","attributes":{"info":"Régate d'hiver dans la baie d'Hyères\n du 2014-01-01 au 2014-01-15\n Organisé par:Hyères Plaisance Organisation","table":"phpboost_regate","idDb":"3"},"state":"closed"}];

$('#treev').tree('loadData',data);
$('#treev').tree({
     onCheck:function(node,checked){
               if(checked) {
                    $('#treev').tree('removeAll');
               }
         }
     });

$.extend($.fn.tree.methods, {
        removeAll:function(jq){
            return jq.each(function(){
                var roots = $(this).tree('getRoots');
                for(var i=roots.length-1; i>=0; i--){
                    $(this).tree('remove', roots[i].target);
                }
		    })
        }
    });