-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat(table): update table to support error messages #230
feat(table): update table to support error messages #230
Conversation
src/components/basic/Table/index.tsx
Outdated
const renderErrorMessage = () => { | ||
if (error == null) { | ||
return <Typography variant="body2">{noRowsMsg ?? 'No rows'}</Typography> | ||
} else if (error != null) { |
Check notice
Code scanning / CodeQL
Unneeded defensive code Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed Unneeded defensive code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary else
src/components/basic/Table/index.tsx
Outdated
const renderErrorMessage = () => { | ||
if (error == null) { | ||
return <Typography variant="body2">{noRowsMsg ?? 'No rows'}</Typography> | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need else if the previous if returns 100% sure. Change from
- if (something) {
- return x
- } else {
- doMore()
- }
to
+ if (something) {
+ return x
+ }
+ doMore()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Description
Updated table component to support error messages
Why
to enhance table component to support error messages
Issue
eclipse-tractusx/portal-frontend#891
eclipse-tractusx/portal-frontend#888
Checklist
Please delete options that are not relevant.