JSX
import * as wjGrid from '@mescius/wijmo.react.grid';
import '@mescius/wijmo.styles/wijmo.css';
const employees = [
{ name: '김민준', department: '개발팀', salary: 85000, active: true, hireDate: new Date(2020, 2, 15) },
{ name: '이서연', department: '마케팅', salary: 72000, active: true, hireDate: new Date(2019, 5, 1) },
{ name: '박지호', department: '개발팀', salary: 91000, active: false, hireDate: new Date(2018, 0, 10) },
{ name: '최수아', department: '인사팀', salary: 68000, active: true, hireDate: new Date(2021, 8, 20) },
{ name: '정도윤', department: '영업팀', salary: 78000, active: true, hireDate: new Date(2020, 11, 5) },
];
function App() {
return (
<wjGrid.FlexGrid
autoGenerateColumns={false}
itemsSource={employees}
style={{ height: '300px' }}
>
<wjGrid.FlexGridColumn binding="name" header="이름" width={120} />
<wjGrid.FlexGridColumn binding="department" header="부서" width={120} />
<wjGrid.FlexGridColumn binding="salary" header="연봉" format="n0" width={130} />
</wjGrid.FlexGrid>
);
}
export default App;