Hello, I'm having trouble rendering an array of widgets in the correct order. I am using graphql to query page data from kentico. The page has a rich text field that can include a number of widgets. When I console log the array of objects, however, the array of widgets is not in order. For example, if the order in the cms is:
text item, video item, image item
then in the array of objects, the order is something like:
image item, text item, video item
This is strange, because it's not in order on my local or on the live site, but it is rendering in order on my colleagues local. We are using the same branch and there is no difference in the code. Do you know why this may be happening?
and is there some way I can make sure the order remains the same in array, as it is in the cms?
here is a simplified version of my query (the linked_items array is not ordered correctly when I console log it):
query workDetailQuery($slug: String!) {
kenticoCloudItemWorkDetailPage(fields: { slug: { eq: $slug } }) {
body_text {
linked_items {
... on KenticoCloudItemStatsBreaker {
internal {
type
}
}
... on KenticoCloudItemSectionBlock {
internal {
type
}
}
... on KenticoCloudItemQuoteWithImages {
internal {
type
}
}
}
}
}
}
UPDATE: this only seems to happen when i am using more that 10 widgets in the rich text field. If I use up to ten widgets, the order is correct. but if I use more than 10, the order is incorrect.