React UI Components
Show Demo List
|
ReactJS Sortable demo. This demo demonstrates jqxSortable displayed as grid.
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title id='Description'>ReactJS Sortable demo. This demo demonstrates jqxSortable displayed as grid.</title>
<link rel="stylesheet" href="../jqwidgets/styles/jqx.base.css" type="text/css" />
<script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxsortable.js"></script>
<script type="text/javascript" src="../jqwidgets/globalization/globalize.js"></script>
<script type="text/javascript" src="../scripts/demos.js"></script>
<style>
.sortable {
list-style-type: none;
margin: 2px;
padding: 5px;
float: left;
width: 312px;
border: lightblue solid 2px;
}
.sortable div {
margin: 1px;
background-color: lightblue;
border: DodgerBlue solid 1px;
padding: 0;
float: left;
padding-left: 0;
text-align: center;
cursor: pointer;
font-size: 5.8em;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="example-description" style="margin-bottom:3em">
ReactJS Sortable demo. This demo demonstrates jqxSortable displayed as grid.
</div>
<div id="app"></div>
<script src="../build/sortable_displayastable.bundle.js"></script>
</body>
</html>
import React from 'react';
import ReactDOM from 'react-dom';
import JqxSortable from '../../../jqwidgets-react/react_jqxsortable.js';
class App extends React.Component {
render() {
return (
<JqxSortable ref='sortable' className='sortable'>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
</JqxSortable>
)
}
}
ReactDOM.render(<App />, document.getElementById('app'));