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

chore: remove storage browser table rows while loading #6183

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jordanvn
Copy link
Member

Description of changes

  • Conditionally set storage browser data table rows to an empty array while table data is not yet available

Issue #, if available

Description of how you validated changes

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • yarn test passes and tests are updated/added
  • PR title and commit messages follow conventional commit syntax
  • If this change should result in a version bump, changeset added (This can be done after creating the PR.) This does not apply to changes made to docs, e2e, examples, or other private packages.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

changeset-bot bot commented Nov 20, 2024

⚠️ No Changeset found

Latest commit: 5d80141

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -52 to -89
const mappedRows = rows.map(({ key, content }) => ({
key,
content: content.map(({ key, content, type }) => {
switch (type) {
case 'button': {
return {
key,
content: <ButtonDataCell content={content} />,
};
}
case 'checkbox': {
return {
key,
content: <CheckboxDataCell content={content} />,
};
}
case 'date': {
return {
key,
content: <DateDataCell content={content} />,
};
}
case 'number': {
return {
key,
content: <NumberDataCell content={content} />,
};
}
case 'text':
default: {
return {
key,
content: <TextDataCell content={content} />,
};
}
}
}),
}));
Copy link
Member Author

Choose a reason for hiding this comment

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

Only change is the addition of the ternary, returning an empty array instead when loading. Rows content is not changed

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.

1 participant