Skip to content

Commit

Permalink
[Streams] Schema Editor isWiredStream > isWiredReadStream (elastic#20…
Browse files Browse the repository at this point in the history
…5251)

## Summary

Small fix to the Schema Editor page after the changes in
elastic#204671.

(Without this mapped fields won't be displayed as we use a read stream
definition).
  • Loading branch information
Kerry350 authored and stratoula committed Jan 2, 2025
1 parent 77dc629 commit 0f480ad
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0f480ad

Please sign in to comment.