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

feat(framework): make getStableDomRef search in the static area item … #2363

Merged
merged 3 commits into from
Oct 19, 2020

Conversation

fifoosid
Copy link
Contributor

…of the component
Part of #2361

* @param {String} refName Defines the name of the stable DOM ref
*/
getStableDomRef(refName) {
return this.getDomRef().querySelector(`[data-ui5-stable=${refName}]`);
return this.staticAreaItemDomRef.querySelector(`[data-ui5-stable=${refName}]`)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think most will be in the normal DOM ref so I would put it first (and it can return early, if found) and only then check in the static area dom ref.
Also, if staticAreaItemDomRef is undefined, it will break. Probably you should put a check for both dom refs :)

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.

2 participants