-
Notifications
You must be signed in to change notification settings - Fork 4k
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
DataViews: update names for DropdownMenuRadioItemCustom
#57416
Changes from all commits
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 |
---|---|---|
|
@@ -117,7 +117,7 @@ export default function AddFilter( { filters, view, onChangeView } ) { | |
return ( | ||
<DropdownMenuRadioItemCustom | ||
key={ element.value } | ||
name={ `add-filter-${ filter.field.id }` } | ||
name={ `add-filter-${ filter.field }` } | ||
value={ element.value } | ||
checked={ isActive } | ||
onClick={ () => { | ||
|
@@ -172,7 +172,7 @@ export default function AddFilter( { filters, view, onChangeView } ) { | |
] ) => ( | ||
<DropdownMenuRadioItem | ||
key={ key } | ||
name={ `add-filter-${ filter.name }-conditions` } | ||
name={ `add-filter-${ filter.field }-conditions` } | ||
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. This rendered |
||
value={ operator } | ||
checked={ | ||
activeOperator === | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,10 @@ const radioCheck = ( | |
* component, which allows deselecting selected values. | ||
*/ | ||
export const DropdownMenuRadioItemCustom = forwardRef( | ||
( { checked, name, value, onChange, onClick, ...props }, ref ) => { | ||
function DropdownMenuRadioItemCustom( | ||
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. React devtools will show |
||
{ checked, name, value, onChange, onClick, ...props }, | ||
ref | ||
) { | ||
const onClickHandler = ( e ) => { | ||
onClick?.( e ); | ||
onChange?.( { ...e, target: { ...e.target, 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.
This rendered
add-filter-undefined
and now it rendersadd-filter-author
(for theauthor
filter).