Skip to content

Custom loader in table row #427

Answered by simonguo
haresh-samnani asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @haresh-samnani you can use rsuite's Placeholder component.

https://table.rsuitejs.com/#loading

Usage

import { Placeholder, Table } from 'rsuite';

const renderLoading = () => {
  return (
    <div
      style={{
        position: 'absolute',
        width: '100%',
        height: '100%',
        background: '#fff',
        padding: 20,
        zIndex: 1
      }}
    >
      <Placeholder.Grid rows={20} columns={6} active />
    </div>
  );
};

const App = () => {
  return (
    <Table loading renderLoading={renderLoading}>
      ...
    </Table>
  );
};

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@haresh-samnani
Comment options

Answer selected by haresh-samnani
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants