JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://igniteui.com/js/modernizr.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.lob.js"></script>
<script src="https://igniteui.com/js-data/hierarchical-files"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<div class="containerTree">
<div id="left">
<h3>File Manager 1</h3>
<div id="firstTree"></div>
</div>
<div id="right">
<h3>File Manager 2</h3>
<div id="secondTree"></div>
</div>
</div>
CSS
.containerTree {
overflow: auto;
width: 100%;
}
.containerTree h3 { margin-bottom: 5px; }
#left {
display: inline;
float: left;
width: 350px;
margin-right: 30px;
margin-bottom: 10px;
}
#right {
float: left;
width: 350px;
margin-bottom: 10px;
}
#firstTree, #secondTree {
font-size: 14px;
}
@media screen and (max-width: 500px) {
#left { width: 270px; }
#right {
width: 270px;
clear: both;
}
}
JavaScript
$(function () {
$("#firstTree").igTree({
checkboxMode: 'triState',
singleBranchExpand: true,
dataSource: $.extend(true, [], files),
dataSourceType: 'json',
initialExpandDepth: 0,
pathSeparator: '.',
bindings: {
textKey: 'Text',
valueKey: 'Value',
imageUrlKey: 'ImageUrl',
childDataProperty: 'Folder'
},
dragAndDrop: true,
dragAndDropSettings: {
allowDrop: true,
customDropValidation: function (element) {
// Validates the drop target
var valid = true,
droppableNode = $(this);
if (droppableNode.is('a') && droppableNode.closest('li[data-role=node]').attr('data-value') === 'File') {
valid = false;
}
return valid;
}
}
});
$("#secondTree").igTree({
checkboxMode: 'triState',
singleBranchExpand: true,
dataSource: $.extend(true, [], files),
dataSourceType: 'json',
initialExpandDepth: 0,
pathSeparator: '.',
bindings: {
textKey: 'Text',
valueKey: 'Value',
imageUrlKey: 'ImageUrl',
childDataProperty: 'Folder'
},
dragAndDrop: true,
dragAndDropSettings: {
allowDrop: true,
customDropValidation: function (element) {
// Validates the drop target
var valid = true,
droppableNode = $(this);
if (droppableNode.is('a') &&...