View as Markdown

API reference: @salmonui/data-grid

DataGridErrorEventinterface

import type { DataGridErrorEvent } from '@salmonui/data-grid';
interface DataGridErrorEvent extends DataGridEvent {
    readonly error: Error;
    readonly action: 'sort' | 'filter' | 'search' | 'page' | 'data' | 'save' | 'persistState' | (string & {});
}

onError (type: 'error'): a rejected action. Not cancellable.

DataGridErrorEvent members (6, 4 inherited)
NameSignatureDescription
errorreadonly error: Error;
actionreadonly action: 'sort' | 'filter' | 'search' | 'page' | 'data' | 'save' | 'persistState' | (string & {});

data: the data source failed to load (the body shows renderError). save: a write (save or delete) failed or was rejected in part; the failed rows keep their drafts (onSave carries the result).

typeinheritedtype: string;

'sortChange', 'beforeSortChange', ...

sourceinheritedsource: DataGridEventSource;
defaultPreventedinheriteddefaultPrevented: boolean;

True after preventDefault() (before-events and click events).

preventDefaultinheritedpreventDefault: () => void;

Before-events and click events: cancels the action (or the built-in behavior).