Skip to content
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

Query Editor: Improve menu placement for dropdowns #292

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/query/ListAssetsQueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class ListAssetsQueryEditor extends PureComponent<Props, State> {
isClearable={true}
isSearchable={true}
formatCreateLabel={(txt) => `Model ID: ${txt}`}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
<EditorField label="Filter" htmlFor="filter" width={20}>
Expand All @@ -92,7 +92,7 @@ export class ListAssetsQueryEditor extends PureComponent<Props, State> {
value={filters.find((v) => v.value === query.filter) || filters[0]}
onChange={this.onFilterChange}
placeholder="Select a property"
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
</EditorFieldGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/components/query/PropertyQueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> {
stats={query.aggregates ?? []}
onChange={this.onAggregateChange}
defaultStat={getDefaultAggregate(property)}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
<EditorField label="Resolution" htmlFor="resolution" width={25}>
Expand All @@ -253,7 +253,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> {
options={resolutions}
value={resolutions.find((v) => v.value === query.resolution) || resolutions[0]}
onChange={this.onResolutionChange}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
</EditorFieldGroup>
Expand Down Expand Up @@ -316,7 +316,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> {
isSearchable={true}
onCreateOption={this.onSetHierarchyId}
formatCreateLabel={(txt) => `Hierarchy Id: ${txt}`}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
) : (
Expand Down Expand Up @@ -426,7 +426,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> {
isSearchable={true}
onCreateOption={this.onSetAssetId}
formatCreateLabel={(txt) => `Asset ID: ${txt}`}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>

Expand Down Expand Up @@ -457,7 +457,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> {
isSearchable={true}
onCreateOption={this.onSetPropertyId}
formatCreateLabel={(txt) => `Property ID: ${txt}`}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
</EditorFieldGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/components/query/QualityAndOrderRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class QualityAndOrderRow extends PureComponent<Props> {
value={qualities.find((v) => v.value === query.quality) ?? qualities[0]}
onChange={this.onQualityChange}
isSearchable={true}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
<EditorField label="Time" width={10} htmlFor="time">
Expand All @@ -111,7 +111,7 @@ export class QualityAndOrderRow extends PureComponent<Props> {
value={ordering.find((v) => v.value === query.timeOrdering) ?? ordering[0]}
onChange={this.onOrderChange}
isSearchable={true}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
<EditorField label="Format" width={10} htmlFor="format">
Expand All @@ -131,7 +131,7 @@ export class QualityAndOrderRow extends PureComponent<Props> {
options={interpolatedResolutions}
value={interpolatedResolutions.find((v) => v.value === query.resolution) || interpolatedResolutions[0]}
onChange={this.onResolutionChange}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/query/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function QueryEditor(props: Props) {
value={currentQueryType}
onChange={onQueryTypeChange}
placeholder="Select query type"
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
<EditorField label="Region" width={15}>
Expand All @@ -107,7 +107,7 @@ export function QueryEditor(props: Props) {
backspaceRemovesValue={true}
allowCustomValue={true}
isClearable={true}
menuPlacement="bottom"
menuPlacement="auto"
/>
</EditorField>
</EditorFieldGroup>
Expand Down
Loading