This repository has been archived by the owner on Oct 24, 2019. It is now read-only.
Releases: nhn/toast-ui.react-grid
Releases Β· nhn/toast-ui.react-grid
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
New Vue Wrapper For TOAST UI Grid 4.0 πππ
Breaking Changes
Data Source
// v1.0.0
const columns = [/* ... */];
const netOptions = {
perPage: 10,
api: {
readData: 'api/readData'
}
};
const MyComponent = () => (
<Grid
columns={columns}
addon={{Net: netOptions}}
/>
);
// v2.0.0
const columns = [/* ... */];
const dataSource = {
withCredentials: false,
initialRequest: true,
api: {
readData: {url: 'api/readData', method: 'GET'}
}
};
const MyComponent = () => (
<Grid
columns={columns}
data={dataSource}
pageOptions={{perPage: 3}}
onSuccessResponse={(data) => {
console.log(data);
}}
/>
);
With React Hooks
React Hooks can be used together.
import React, {useCallback} from 'react';
const MyComponentWithHooks = () => {
const onClick = useCallback(() => {
console.log('condition:', condition);
}, [condition]);
return <Grid columns={columns} data={data} onClick={onClick} />;
};
API Document
v1.0.0
chore: build 1.0.0