Skip to content

Commit

Permalink
Add titles to add menus
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanLeRoy committed May 7, 2024
1 parent 1d98319 commit a6e0f8e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/components/AnnotationPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Props {
hasSelectAllCapability?: boolean;
disableUnavailableAnnotations?: boolean;
className?: string;
title?: string;
selections: Annotation[];
annotationSubMenuRenderer?: (
item: ListItem<Annotation>
Expand Down Expand Up @@ -67,6 +68,7 @@ export default function AnnotationPicker(props: Props) {
<ListPicker
className={props.className}
items={items}
title={props.title}
onDeselect={removeSelection}
onSelect={addSelection}
onSelectAll={
Expand Down
1 change: 1 addition & 0 deletions packages/core/components/QueryPart/QueryFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function QueryFilter(props: Props) {
onRenderAddMenuList={() => (
<AnnotationPicker
disableUnavailableAnnotations
title="Select metadata to filter by"
annotationSubMenuRenderer={(annotationItem) => (
<AnnotationFilterForm annotation={annotationItem.data as Annotation} />
)}
Expand Down
1 change: 1 addition & 0 deletions packages/core/components/QueryPart/QueryGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function QueryGroup(props: Props) {
<AnnotationPicker
disabledTopLevelAnnotations
disableUnavailableAnnotations
title="Select metadata to group by"
selections={selectedAnnotations}
setSelections={(annotations) => {
dispatch(
Expand Down
1 change: 1 addition & 0 deletions packages/core/components/QueryPart/QuerySort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default function QuerySort(props: Props) {
onRenderAddMenuList={() => (
<AnnotationPicker
disableUnavailableAnnotations
title="Select metadata to sort by"
selections={annotations.filter(
(annotation) => annotation.name === props.sort?.annotationName
)}
Expand Down

0 comments on commit a6e0f8e

Please sign in to comment.