mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 10:53:33 +00:00
Add loading skeleton to table cell rows
This commit is contained in:
parent
a147b56485
commit
39a114aad9
6 changed files with 118 additions and 45 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import type { ICellRendererParams } from '@ag-grid-community/core';
|
||||
import { Link } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
import { Skeleton } from '/@/renderer/components/skeleton';
|
||||
import { Text } from '/@/renderer/components/text';
|
||||
|
||||
export const CellContainer = styled.div<{
|
||||
|
|
@ -32,6 +33,17 @@ export const GenericCell = (
|
|||
) => {
|
||||
const displayedValue = valueFormatted || value;
|
||||
|
||||
if (!value) {
|
||||
return (
|
||||
<CellContainer position={position || 'left'}>
|
||||
<Skeleton
|
||||
height="1rem"
|
||||
width="80%"
|
||||
/>
|
||||
</CellContainer>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<CellContainer position={position || 'left'}>
|
||||
{isLink ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue