-
Notifications
You must be signed in to change notification settings - Fork 31
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
Simple table with data from external API #2416
base: main
Are you sure you want to change the base?
Conversation
Quality Gate failedFailed conditions |
return ( | ||
<ErrorList | ||
nodeId={node.id} | ||
errors={['Tabelldata må være en liste av objekter']} | ||
/> | ||
); |
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.
Instead of rendering out an ErrorList, just throw an error instead. It will be caught in the error handler, logged to devtools, and then displayed in an error list. I would prefer not to export the ErrorList, as it just makes it possible to circumvent the normal way these errors are caught and logged.
); | ||
}; | ||
|
||
function renderCell(component: ColumnConfig['component'], row: Record<string, unknown>) { |
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.
This should probably just be a react component instead. 🙌
new CG.prop('id', new CG.str()), | ||
new CG.prop('title', new CG.str()), | ||
new CG.prop( | ||
'component', |
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.
I would probably call this content
instead of component
. The latter has a specific meaning for app developers, and we use it in Grid
to point to other components in the layout. Here, as it's a mini-layout with types Text
and Link
. Since we already have an actual layout-component called Text
, this might look confusing to app developers.
d4dc64a
to
6f3a68a
Compare
Quality Gate failedFailed conditions |
Description
MVP for showing a static table with data from external API. Should maybe extend the data sources in the future, like hard coded lists or data models, but first of all seeing if this is sufficient for now to avoid gold plating.
The biggest question is how to best make this backwards compatible if we decide to change it. I have added the
type
property to thedata
property in the config to support this. But maybe expressions could be better, potentially? But in that case expressions would need to support lists, and we might not want to continue to extend expressions before we decide if we actually want to have them both backend and frontend. 🤔 Appreciate any thoughts on this!Related Issue(s)
Verification/QA
kind/*
label to this PR for proper release notes grouping