Fire layout updates before attempting to scroll (improves docExpansion:none support)

This commit is contained in:
Kyle Shockey
2017-07-14 02:45:40 -07:00
parent 556e40e6d4
commit 2906bdd699

View File

@@ -31,16 +31,19 @@ export const updateResolved = (ori, { layoutActions, getConfigs }) => (...args)
if(tag && operationId) {
// Pre-expand and scroll to the operation
layoutActions.show(["operations-tag", tag], true)
layoutActions.show(["operations", tag, operationId], true)
scrollTo(`#operations-${tag}-${operationId}`, {
offset: SCROLL_OFFSET
})
layoutActions.show(["operations", tag, operationId], true)
} else if(tag) {
// Pre-expand and scroll to the tag
layoutActions.show(["operations-tag", tag], true)
scrollTo(`#operations-tag-${tag}`, {
offset: SCROLL_OFFSET
})
layoutActions.show(["operations-tag", tag], true)
}
}