Repository navigation
Release v4.15.0
Query-backed tables and DataPage now tell your users when data is loading, when a query failed, and when they are not allowed to see it. Until now, all three looked like an empty result.
Added
DataTableForQuery,DataTableForObservableQuery, andDataPageshow a loading row while the first result is on its way, and a failure row when the query fails or the user is not authorized. A table that is refreshing rows it already shows keeps them visible and marks itself busy (aria-busyon the table,data-busyon the root). Server exception text is never shown. (#327)loadingMessage,failureMessage, andunauthorizedMessageprops onDataTableCore, both query tables, andDataPage, with provider-wide defaults inCratisComponentsProvidermessages.dataTable.loading,.failed, and.unauthorized. (#327)DataTableCoreacceptsstatus(DataTableStatus.Ready,Loading,Failed, orUnauthorized) so a table over local rows can show the same states. (#327)- New stable parts
loading-row,loading-cell,failure-row, andfailure-cell(typed asloadingRow,loadingCell,failureRow, andfailureCellinDataTableParts). The failure cell carriesdata-reason, and the loading and failure text are announced to screen readers throughrole="status"androle="alert". (#327) PivotViewerannounces its loading state to screen readers, labeled by the newloadingLabelprop (defaultLoading…). (#328)
Changed
- While a query table's first result loads, or when its query fails or is unauthorized, the table now renders the new loading or failure row instead of an empty
empty-row/emptyMessage.empty-rowstill renders for a query that returns no rows. If your CSS or tests targetempty-rowto detect loading or errors, update them to the new parts. (#327) - An observable query that is missing a required argument never subscribes, so its table now shows the loading row until every required argument has a value; before, it showed a blank row. A snapshot query missing a required argument still shows
emptyMessage. (#327) ToolbarButtonexposesaria-pressedwhen you passactive, so assistive technology announces the toggle state. Buttons withoutactiveare unchanged. (#328)