JSFiddle - React, Tailwind, and code Playground

by sparksterz

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.default.min.css">
<script src="http://cdn.kendostatic.com/2012.3.1315/js/kendo.all.min.js"></script>
<h3>Using the latest Kendo scripts, selecting/expanding tree nodes forces the scroll bar back to the top of the tree view<h3>
<div style="height:125px; overflow-y:scroll; border-width:5px; border-style:solid;">
    <div>Other stuff and fancy things</div>
    <div id="treeview-left"> </div>
</div>

JavaScript

$("#treeview-left").kendoTreeView({
    dataSource: [{
        text: "Furniture",
        items: [
            {
            text: "Tables & Chairs"},
        {
            text: "Sofas"},
        {
            text: "Occasional Furniture"}
        ]},
    {
        text: "Decor",
        items: [
            {
            text: "Bed Linen"},
        {
            text: "Curtains & Blinds"},
        {
            text: "Carpets"}
        ]},
    {
        text: "Decor1",
        items: [
            {
            text: "Bed Linen1"},
        {
            text: "Curtains & Blinds1"},
        {
            text: "Carpets1"}
        ]},
    {
        text: "Decor2",
        items: [
            {
            text: "Bed Linen2"},
        {
            text: "Curtains & Blinds2"},
        {
            text: "Carpets2"}
        ]},
    {
        text: "Decor3",
        items: [
            {
            text: "Bed Linen3"},
        {
            text: "Curtains & Blinds3"},
        {
            text: "Carpets3"}
        ]},
    {
        text: "Decor4",
        items: [
            {
            text: "Bed Linen4"},
        {
            text: "Curtains & Blinds4"},
        {
            text: "Carpets4"}
        ]},
    {
        text: "Decor5",
        items: [
            {
            text: "Bed Linen5"},
        {
            text: "Curtains & Blinds5"},
        {
            text: "Carpets5"}
        ]}
                                                                   ]
});