Skip to content

Conversation

@trishaprile
Copy link
Contributor

@trishaprile trishaprile commented Aug 9, 2025

AdvancedTable

Overview

AdvancedTables can be used to interact with tabular data. It supports real-time filtering, column sorting, pagination for large datasets, and CSV exporting.

image

Usage

<AdvancedTable
  data={[
    {
      code: 'APIKEY_EMPTY',
      status: 'Unauthorized',
      description: 'An API key was not supplied.',
      message: 'You must pass in an API key.',
    },
    {
      code: 'APIKEY_MISMATCH',
      status: 'Forbidden',
      description: "The API key doesn't match the project.",
      message: "The API key doesn't match the project.",
    },
    {
      code: 'APIKEY_NOTFOUND',
      status: 'Unauthorized',
      description: "The API key couldn't be located.",
      message: "We couldn't find your API key.",
    },
    {
      code: 'API_ACCESS_REVOKED',
      status: 'Forbidden',
      description: 'Your ReadMe API access has been revoked.',
      message: 'Your ReadMe API access has been revoked.',
    },
    {
      code: 'API_ACCESS_UNAVAILABLE',
      status: 'Forbidden',
      description: 'Your ReadMe project does not have access to this API. Please reach out to [email protected].',
      message: 'Your ReadMe project does not have access to this API. Please reach out to [email protected].',
    },
    {
      code: 'APPLY_INVALID_EMAIL',
      status: 'Bad Request',
      description: 'You need to provide a valid email.',
      message: 'You need to provide a valid email.',
    },
    {
      code: 'APPLY_INVALID_JOB',
      status: 'Bad Request',
      description: 'You need to provide a job.',
      message: 'You need to provide a job.',
    },
    {
      code: 'APPLY_INVALID_NAME',
      status: 'Bad Request',
      description: 'You need to provide a name.',
      message: 'You need to provide a name.',
    },
    {
      code: 'CATEGORY_INVALID',
      status: 'Bad Request',
      description: "The category couldn't be saved.",
      message: "We couldn't save this category ({error}).",
    },
    {
      code: 'CATEGORY_NOTFOUND',
      status: 'Not Found',
      description: "The category couldn't be found.",
      message: "The category with the slug '{category}' couldn't be found.",
    },
    {
      code: 'CHANGELOG_INVALID',
      status: 'Bad Request',
      description: "The changelog couldn't be saved.",
      message: "We couldn't save this changelog ({error}).",
    },
    {
      code: 'CHANGELOG_NOTFOUND',
      status: 'Not Found',
      description: "The changelog couldn't be found.",
      message: "The changelog with the slug '{slug}' couldn't be found.",
    },
  ]}
/>

Props

Prop Type Description
data array An array of objects representing the rows of the table.

Copy link
Contributor

@A5HM49 A5HM49 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@trishaprile trishaprile marked this pull request as ready for review August 15, 2025 01:29
runnabro
runnabro previously approved these changes Aug 15, 2025
Copy link
Member

@runnabro runnabro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just some minor feedback :)

>
{col.replace(/_/g, ' ').replace(/^./, (c) => c.toUpperCase())}
{idx === 0 && sortOrder === 'asc' && <i className="fa fa-arrow-up pl-2 text-[10px] font-bold" />}
{idx === 0 && (sortOrder === 'desc' || sortOrder === null) && <i className="fa fa-arrow-down pl-2 text-[10px] font-bold" />}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks a little off-center to me in your ss!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the ss!

@trishaprile trishaprile requested a review from runnabro August 20, 2025 23:33
@trishaprile trishaprile merged commit 987dcc3 into main Aug 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants