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

fix: order of query editor extensions not working #8045

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
2 changes: 2 additions & 0 deletions changelogs/fragments/8045.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Order of query editor extensions not working ([#8045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8045))
9 changes: 9 additions & 0 deletions src/plugins/data/public/ui/query_editor/_query_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@
}
}

.osdQueryEditor__header {
display: flex;
align-items: center;

.osdQueryEditorExtensionComponent {
padding: 0 $euiSizeXS $euiSizeXS;
}
}

.osdQueryEditor__topBar {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,21 @@ const QueryEditorExtensions: React.FC<QueryEditorExtensionsProps> = React.memo((

return (
<>
{sortedConfigs.map((config) => (
<QueryEditorExtension
key={config.id}
config={config}
dependencies={dependencies}
componentContainer={componentContainer}
bannerContainer={bannerContainer}
/>
))}
{sortedConfigs.map((config) => {
const extensionComponentContainer = document.createElement('div');
extensionComponentContainer.className = `osdQueryEditorExtensionComponent osdQueryEditorExtensionComponent__${config.id}`;
componentContainer.appendChild(extensionComponentContainer);

return (
<QueryEditorExtension
key={config.id}
config={config}
dependencies={dependencies}
componentContainer={extensionComponentContainer}
bannerContainer={bannerContainer}
/>
);
})}
</>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/

.queryAssist {
&.queryAssist__form {
padding: 0 $euiSizeXS $euiSizeXS;
}

&.queryAssist__callout {
margin-top: $euiSizeXS;
}
}

.osdQueryEditorExtensionComponent__query-assist {
flex-grow: 1;
}
Loading