-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add Settings menu to scroll info panel to top when browsing through rows #2937
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
Changes from all commits
d4bce76
f7101ce
e9693c1
8af69bc
e4dbc17
3248cc6
3fc8714
71dfd92
f100868
3858279
ad92515
30974be
4f94157
60c46e8
f435cfb
c2fc2da
58b97b7
5ab0681
4858d43
a192947
3c3e112
5d8cd0b
e4eb0a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -19,8 +19,24 @@ const MenuItem = ({ text, disabled, active, greenActive, onClick }) => { | |||||||
if (greenActive) { | ||||||||
classes.push(styles.greenActive); | ||||||||
} | ||||||||
|
||||||||
const handleClick = (e) => { | ||||||||
if (!disabled && onClick) { | ||||||||
onClick(e); | ||||||||
} | ||||||||
}; | ||||||||
|
||||||||
return ( | ||||||||
<div className={classes.join(' ')} onClick={disabled ? undefined : onClick}> | ||||||||
<div | ||||||||
className={classes.join(' ')} | ||||||||
onClick={handleClick} | ||||||||
onMouseDown={handleClick} // This is needed - onClick alone doesn't work in this context | ||||||||
Comment on lines
+32
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential double execution of click handler Setting both - onClick={handleClick}
- onMouseDown={handleClick} // This is needed - onClick alone doesn't work in this context
+ onMouseDown={handleClick} // Using onMouseDown due to event propagation requirements 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||
style={{ | ||||||||
position: 'relative', | ||||||||
zIndex: 9999, | ||||||||
cursor: 'pointer' | ||||||||
}} | ||||||||
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Move inline styles to CSS for better maintainability The inline styles should be moved to the BrowserMenu.scss file to maintain consistency and improve maintainability. The high z-index value (9999) could also cause stacking issues with other UI elements. Add to BrowserMenu.scss: .item {
position: relative;
z-index: 10; // Use a more reasonable z-index
cursor: pointer;
} Then update the component: - style={{
- position: 'relative',
- zIndex: 9999,
- cursor: 'pointer'
- }} 🤖 Prompt for AI Agents
|
||||||||
> | ||||||||
{text} | ||||||||
</div> | ||||||||
); | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2016-present, Parse, LLC | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the license found in the LICENSE file in | ||
* the root directory of this source tree. | ||
*/ | ||
@import 'stylesheets/globals.scss'; | ||
|
||
.menuCheck { | ||
margin-right: 6px; | ||
margin-bottom: -1px; | ||
padding-top: 0; | ||
} |
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.
Add missing setCurrent to PropTypes
The
setCurrent
prop is used in the component but not defined in PropTypes. This should be documented for better type safety and clarity.Also applies to: 108-108, 133-142
🤖 Prompt for AI Agents