moai icon indicating copy to clipboard operation
moai copied to clipboard

[Table] support loading and empty data

Open dangbt opened this issue 3 years ago • 3 comments

dangbt avatar Apr 24 '21 02:04 dangbt

Is there an example what do you expect to see when the date is not available yet?

  • Keeping the old state
  • Showing skeleton state (in which case you should pass the length of the rows, I think)

API-wise, I think a "busy" prop should be enough for Loading state. Not sure yet about the empty one.

thien-do avatar Apr 24 '21 06:04 thien-do

example here: https://codepen.io/dangbt/pen/QWdYeLp if data is empty, we should display a row with text 'No Data' or something About the state, we need a flag to know the data is fetching: busy or loading

dangbt avatar Apr 26 '21 02:04 dangbt

Hm that looks ok to be added

thien-do avatar Apr 26 '21 03:04 thien-do