collectionsonline icon indicating copy to clipboard operation
collectionsonline copied to clipboard

Fix number of child records shown on MPH record

Open evancp87 opened this issue 10 months ago • 1 comments

There is no longer a cap on MPH records fetched from ES, so on large records all children will be rendered. The problem with this is that this breaks the currently implemented show more button that is rendered after 23 results, as the children are no longer capped at that number, as seen on this record:

https://collection.sciencemuseumgroup.org.uk/objects/co8413731/collection-of-objects-and-archives-from-boddingtons-brewery-at-strangeways-collection-of-objects-and-archives

The cap was removed for another reason, but could be "re-implemented" lower down the hierarchy, after the results have been fetched, to create and render a slice of the records, that is rendered on the parent.

evancp87 avatar Apr 11 '24 16:04 evancp87

Show 'see more' button if count.direct-descendants > child.length

In ES record:

        "counts":
        {
            "direct-descendants": 101,
            "all-descendants": 101
        },

You may need to add counts to fixtures/attributes.js

jamieu avatar Apr 15 '24 13:04 jamieu