JSFiddle - React, Tailwind, and code Playground

by Agus Sigit Wisnubroto

HTML

<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> 
<script type="text/javascript" src="http://www.jeasyui.com/easyui/datagrid-groupview.js"></script>
<body>
    
<!--<button onClick="fixIt();">Fix</button> -->
<button onClick="doAdd();">Add</button>
    
<table class="easyui-datagrid" id="dg" data-options="
        singleSelect:true,
        collapsible:true,
        rownumbers:true,
        fitColumns:true,
        view:groupview,
        groupField:'code',
        groupFormatter:function(value,rows){
        return value + ' - ' + rows.length + ' Item(s)';
        }
">
    <thead>
        <tr>
            <th data-options="field:'code'">Code</th>
            <th data-options="field:'name'">Name</th>
            <th data-options="field:'price'">Price</th>
        </tr>
    </thead>
    </table>
    
    
    <script>
        //function fixIt(){
        //    $('#dg').datagrid({data:[]});
        //}
        
        function doAdd(){
            $('#dg').datagrid('insertRow',{
                index: 0,	// index start with 0
                row: {
                name: 'new name',
                code: '30',
                ss: 'sssssssss'
            }
        });
}
        
    </script>