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

results grid: pass correct value to results prop #260

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

jennur
Copy link
Member

@jennur jennur commented Dec 11, 2023

Closes https://github.com/zenodo/rdm-project/issues/567

  • I believe this was a bug, as it is passed in the same way for ResultsList, and also makes it easier to override this way.

@slint slint merged commit 425334f into inveniosoftware:master Jan 16, 2024
@@ -71,7 +71,7 @@ const Element = ({ overridableId, results, resultsPerRow }) => {
return (
<Overridable
id={buildUID("ResultsGrid.container", overridableId)}
results={results}
results={_results}
Copy link
Contributor

Choose a reason for hiding this comment

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

@kpsherva @jrcastro2 given that you have reviewed this one.
IMO, I don't think this was 100% correct: the idea here is to pass the "raw" values, that would allow you to use results to build your own layout when overriding.
Passing _results means that when overriding, you get already a GridItem React cmp, instead of the list of results object, and you cannot easily change that cmp.

Can you please fix this?

Ping @zzacharo for any other opinion.

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.

5 participants