-
Notifications
You must be signed in to change notification settings - Fork 299
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
823 direct paging users #1215
823 direct paging users #1215
Conversation
grafana-plugin/src/components/SearchInput/SearchInput.module.css
Outdated
Show resolved
Hide resolved
export function useOnClickOutside(ref, handler) { | ||
useEffect(() => { | ||
const listener = (event) => { | ||
if (!ref.current || ref.current.contains(event.target)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(ref.current?.contains(event.target)) {}
shorthand 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your expression doesn't do the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, my bad. I read it as &&
instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but left a few questions and minor things. Also it would be nice if we could add a few tests for this new feature
# What this PR does Adds direct user paging ## Which issue(s) this PR fixes #823 ## Checklist - [ ] Tests updated - [ ] Documentation added (documentation will be added later) - [x] `CHANGELOG.md` updated --------- Co-authored-by: Maxim <maxim.mordasov@grafana.com>
What this PR does
Which issue(s) this PR fixes
Checklist
CHANGELOG.md
updated