Skip to content

Commit da13fcb

Browse files
committed
Document loading messages, loading indicator, and error message props
1 parent 41e21b5 commit da13fcb

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,27 @@ An example of show to use bulk actions is shown below.
264264

265265
### Loading message & indicator
266266

267-
TODO
267+
By default, the React Dynamic Data Table will not show indication that it is
268+
loading. On slow connections, this may make the table appear unresponsive or
269+
sluggish when initialing loading, changing pages, re-ordering, and so on.
270+
271+
If you wish you can specify a `loadingMessage` prop when you are loading in
272+
your data, or performing other operations. This prop expects a string, which
273+
should contain a message when loading, such as `Loading...`. When loading is
274+
completed, this prop must be reset to an empty string in order to ensure
275+
the data table is displayed.
276+
277+
Optionally, you can specify a `loadingComponent` prop. Whenever the
278+
`loadingMessage` prop is specified, the component passed into the
279+
`loadingComponent` prop will be rendered above it.
268280

269281
### Error message
270282

271-
TODO
283+
In the case that something goes wrong, such as data failing to load, you
284+
can display and error message in place of the normal React Dynamic
285+
Data Table output.
286+
287+
In order to display an error message, you just need to set the optional
288+
`errorMessage` prop. This prop expects a string such as `An error has occurred
289+
while loading user data.`. If the error is resolved, this prop must be reset
290+
to an empty string in order to ensure the data table is displayed.

0 commit comments

Comments
 (0)