Skip to content

Commit

Permalink
fix(Table): render not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Jul 5, 2024
1 parent fa60447 commit 21d610f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const Table: YuntiTable & {

const formatColumns = useMemo(() => {
return columns?.map(item => {
if (!item.render) {
item.render = text => text ?? '-';
if (item.render) {
return item;
}

if (
Expand All @@ -58,6 +58,10 @@ export const Table: YuntiTable & {
};
}

if (!item.render) {
item.render = text => text ?? '-';
}

return item;
});
}, [columns]);
Expand Down

0 comments on commit 21d610f

Please sign in to comment.