-
Notifications
You must be signed in to change notification settings - Fork 2
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
DropdownSection #1409
DropdownSection #1409
Conversation
70e087d
to
132a4f4
Compare
<MenuItem> | ||
<input | ||
onChange={onFilterChange} | ||
onClick={onFilterClick} |
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.
the onclick for this filter input just calls preventDocumentHandler. Is that needed? I wouldn't have expected this input to need any onClick handler.
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.
It is needed or clicking on the filter input will close the menu
@@ -190,7 +190,7 @@ export const FindDerivativesMenuItem: FC<Props> = memo(props => { | |||
|
|||
return ( | |||
<DisableableMenuItem | |||
operationPermitted={!invalidFilterNames} | |||
disabled={invalidFilterNames !== ''} |
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.
can invalidFilterNames be undefined?
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.
No because it's calculated from an array.join(',')
on an array that is always defined and defaults to []
.
@@ -324,6 +324,8 @@ export const FilterExpressionView: FC<Props> = memo(props => { | |||
const expanded = expandedOntologyKey === ontologyBrowserKey; | |||
// FIXME: This is not a proper usage of Dropdown, as it is not rendering any MenuItems this behavior | |||
// should be accomplished some other way (OverlayTrigger + Popover with click events?) | |||
// Note: we can just replace this with some basic logic to show/hide it and render it inline, it does | |||
// not need to render as a floating item, so Dropdown is very unnecessary. |
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.
I assume this is for another / separate PR?
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.
Yep, going to handle this case with the ProductMenu et. al.
5745ef0
to
864d847
Compare
It is unused
864d847
to
72e17b7
Compare
Rationale
This PR adds DropdownSection as a replacement for SubMenu so we can remove all remaining usages of DropdownButton and MenuItem from react-bootstrap.
Related Pull Requests
Changes