This commit is contained in:
Marta Kowalska
2025-10-22 08:13:59 +00:00
commit 80ca059fb8
162 changed files with 16816 additions and 0 deletions

31
demos/cases/GanttSort.jsx Normal file
View File

@@ -0,0 +1,31 @@
import { useMemo } from 'react';
import { getData, zoomConfig } from '../data';
import { Gantt } from '../../src/';
import './GanttSort.css';
function GanttSort({ skinSettings }) {
const data = useMemo(() => getData(), []);
function init(api) {
api.intercept('sort-tasks', (config) => {
return config.key == 'text';
});
}
return (
<div className="wx-fr1PMpDW demo">
<h4>Sorting by the "Task Name" column only</h4>
<div className="wx-fr1PMpDW gtcell">
<Gantt
init={init}
{...skinSettings}
tasks={data.tasks}
links={data.links}
zoom={zoomConfig}
/>
</div>
</div>
);
}
export default GanttSort;