-
Bug
-
Resolution: Done
-
Minor
-
None
-
False
-
False
-
0
-
Undefined
-
Not Supported
-
-
ODC Sprint 202
-
Low
Description of problem:
elements in quick start markdown are not present on the first render. so using the QuerySelectorAll with useMemo returns an empty list on first render but since we are using useMemo and dependencies array doesn't detect any change with `document` on the subsequent render even though elements are present in dom.
https://github.com/openshift/console/pull/8527#discussion_r610869592
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- The issue can be reproduced in the MarkdownCopyClipboard.tsx or MarkdownExecuteSnippet.tsx by wrapping the document.querySelectorAll call with useMemo
Actual results:
useMemo returns an empty list
Expected results:
elements should be present and useMemo should return all the element matching the query selector