type fixes for React 18

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-13 00:05:25 +02:00
parent ae3fc31df4
commit 71c97e7d73
9 changed files with 45 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-techdocs': patch
---
The `spec.lifecycle' field in entities will now always be rendered as a string.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-code-coverage': patch
---
The warning for missing code coverage will now render the entity as a reference.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fixed the type declaration of `DependencyGraphProps`, the `defs` prop now expects `JSX.Element`s.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
The `spec.type` field in entities will now always be rendered as a string.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-import': patch
---
The `app.title` configuration is now properly required to be a string.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-react': patch
---
The filter options passed to `SearchResultGroupLayout` are now always explicitly rendered as strings by default.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search': patch
---
Minor internal code cleanup.
@@ -101,7 +101,7 @@ export const CustomFieldExplorer = ({
}, [customFieldExtensions]);
const handleSelectionChange = useCallback(
selection => {
(selection: LegacyFieldExtensionOptions) => {
setSelectedField(selection);
setFieldFormState({});
setFormState({});
@@ -110,7 +110,7 @@ export const CustomFieldExplorer = ({
);
const handleFieldConfigChange = useCallback(
state => {
(state: {}) => {
setFieldFormState(state);
// Force TemplateEditorForm to re-render since some fields
// may not be responsive to ui:option changes
@@ -130,7 +130,11 @@ export const CustomFieldExplorer = ({
value={selectedField}
label="Choose Custom Field Extension"
labelId="select-field-label"
onChange={e => handleSelectionChange(e.target.value)}
onChange={e =>
handleSelectionChange(
e.target.value as LegacyFieldExtensionOptions,
)
}
>
{fieldOptions.map((option, idx) => (
<MenuItem key={idx} value={option as any}>
@@ -162,7 +162,8 @@ export const TemplateFormPreviewer = ({
);
const handleSelectChange = useCallback(
selected => {
// TODO(Rugvip): Afaik this should be Entity, but didn't want to make runtime changes while fixing types
(selected: any) => {
setSelectedTemplate(selected);
setTemplateYaml(yaml.stringify(selected.spec));
},