mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 13:40:24 +02:00
Add loading skeleton to table cell rows
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
Reference in New Issue
Block a user