-
Notifications
You must be signed in to change notification settings - Fork 31
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
Change dataset filters to Patternfly Attribute Filter pattern: Fixes: #1346 #1797
Conversation
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.
Hey @johnaohara, this looks an awesome improvement in the UI ❤️
I left a couple of comments.
props.options.map((option) => ( | ||
<MenuItem isSelected={props.selection === option} itemId={option} key={option}> | ||
{option} | ||
</MenuItem> |
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.
We need to filter out undefined
options otherwise we would have null options (that are selected by default):
props.options.map((option) => ( | |
<MenuItem isSelected={props.selection === option} itemId={option} key={option}> | |
{option} | |
</MenuItem> | |
props.options.filter(option => option).map((option) => ( | |
<MenuItem isSelected={props.selection === option} itemId={option} key={option}> | |
{option} | |
</MenuItem> |
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 filter does remove undefined
, but the api (maybe it is the json marshalling, idk atm) is returning a mixture of null
and undefined, and it is the null
values that are causing the issue.
Other LabelValues only return undefined
for an unknown value.
My intention was to merge this PR as it is, and then fix the api problem that is returning the wrong data type for an unknown label value
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.
Got it 👍
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.
LGTM
This PR changes the filter dropdown to use the Patternfly
attribute-search
patternFixes Issue
Fixes: #1346