Skip to content

Commit

Permalink
Merge pull request #53 from bleu-fi/luiza/perk-1078-all-actions-table…
Browse files Browse the repository at this point in the history
…-joao

chore: add display type for columns
  • Loading branch information
ribeirojose authored Apr 11, 2024
2 parents a1ef448 + 9641f1a commit 67d29d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/DataTable/SWRDataTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export const formatParamsToDataTable = (params, searchKey) => {
export const renderDataTableCell = ({ filters, column, row, selectedRows }) => {
const value = row.getValue(column.columnDef.accessorKey);

switch (column.columnDef.type) {
const displayAs =
column.columnDef.field_options?.display_type || column.columnDef.type;

switch (displayAs) {
case "text":
return <div className="max-w-[400px] truncate">{value}</div>;
case "boolean":
Expand Down

0 comments on commit 67d29d5

Please sign in to comment.