[Streams] Schema Editor isWiredStream > isWiredReadStream (#205251)

## Summary

Small fix to the Schema Editor page after the changes in
https://github.com/elastic/kibana/pull/204671.

(Without this mapped fields won't be displayed as we use a read stream
definition).
This commit is contained in:
Kerry Gallagher 2024-12-30 14:24:19 +00:00 committed by GitHub
parent f3d7fa7d12
commit 8cc2f2b9c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ import type {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import useToggle from 'react-use/lib/useToggle';
import { isWiredStream, ReadStreamDefinition } from '@kbn/streams-schema';
import { isWiredReadStream, ReadStreamDefinition } from '@kbn/streams-schema';
import { FieldType } from './field_type';
import { FieldStatus } from './field_status';
import { FieldEntry, SchemaEditorEditingState } from './hooks/use_editing_state';
@ -93,7 +93,7 @@ export const FieldsTableContainer = ({
}, [inheritedFields, query]);
const mappedFields = useMemo(() => {
if (isWiredStream(definition)) {
if (isWiredReadStream(definition)) {
return Object.entries(definition.stream.ingest.wired.fields).map(([name, field]) => ({
name,
type: field.type,