Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEC-632: OXD list table skeleton improvements and fixes #785

Merged
merged 7 commits into from
Jul 29, 2024

Conversation

dilansisitha1
Copy link

@dilansisitha1 dilansisitha1 commented Jul 16, 2024

Checklist

  • Test Coverage is 100% for the newly added code
  • Storybook stories are added/updated for the changed areas
  • Components standards defined in this document are followed
  • Code is linted properly
  • Developer testing is done for the affected areas
  • Package version updated (not applicable to ent branch)
  • Changelog.md updated on possible breaking (applicable to ent branch)

@Super-Chama Super-Chama marked this pull request as ready for review July 26, 2024 14:00
const cardHeaders = computed(() => {
const headers = props.headers.map(header => {
Copy link
Member

Choose a reason for hiding this comment

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

const cardHeaders = computed(() => {
  if (props.loading && props.skeleton) {
    return [
      {
        name: "selector",
        cellType: "oxd-table-cell-checkbox",
      },
      ...props.headers.filter(
        (header) => header.name !== "action" && !header.title
      ),
    ];
  }
  if (props.selectable) {
    return [
      {
        name: "selector",
        cellType: "oxd-table-cell-checkbox",
      },
      ...headers,
    ];
  }

  return props.headers;
});

Consider this refactoring rather than using computedHeaders

Copy link
Author

Choose a reason for hiding this comment

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

computedHeaders and cardHeaders has two different behaviors.

@Super-Chama Super-Chama changed the title TEC-632 : Skeleton loader improvements TEC-632: OXD list table skeleton improvements and fixes Jul 29, 2024
@Super-Chama Super-Chama merged commit 9f3b9d2 into orangehrm:ent Jul 29, 2024
3 checks 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.

2 participants