Transformations: Organize by fields betterer fix (#110127)

fix: betterer
This commit is contained in:
Alex Spencer 2025-08-25 13:02:05 -07:00 committed by GitHub
parent 67502a5a7c
commit c658b702f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -2941,9 +2941,6 @@ exports[`better eslint`] = {
"public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [
[0, 0, 0, "Add noMargin prop to Field components to remove built-in margins. Use layout components like Stack or Grid with the gap prop instead for consistent spacing.", "0"]
],
"public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [
[0, 0, 0, "React Hook \\"useStyles2\\" is called conditionally. React Hooks must be called in the exact same order in every component render.", "0"]
],
"public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],

View File

@ -243,6 +243,8 @@ const OrganizeFieldsTransformerEditor = ({ options, input, onChange }: OrganizeF
[options, onChange, uiOrderByItems]
);
const styles = useStyles2(getDraggableStyles);
// Show warning that we only apply the first frame
if (input.length > 1) {
return (
@ -255,8 +257,6 @@ const OrganizeFieldsTransformerEditor = ({ options, input, onChange }: OrganizeF
);
}
const styles = useStyles2(getDraggableStyles);
return (
<>
<InlineFieldRow className={styles.fieldOrderRadio}>