JavaScript
TOAST UI Grid Pagination Using Callbacks
doopang
2023. 9. 16. 21:20
https://github.com/nhn/tui.grid/blob/master/packages/toast-ui.grid/docs/en/data-source.md
Using Callbacks
grid.on('beforeRequest', function(data) {
// Before sending the request
}).on('response', function(data) {
// When a response has been received regardless of success.
const response = data.xhr.response;
const responseObj = JSON.parse(response);
if (responseObj.result) {
...
}
}).on('successResponse', function(data) {
// When the result is set to true
}).on('failResponse', function(data) {
// When the result is set to false
}).on('errorResponse', function(data) {
// When an error occurs
});