diff --git a/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts b/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts index 192b82551e7c0..e8847ac14bbfe 100644 --- a/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts +++ b/x-pack/plugins/siem/common/graphql/shared/schema.gql.ts @@ -17,7 +17,7 @@ export const sharedSchema = gql` } type CursorType { - value: String! + value: String tiebreaker: String } diff --git a/x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx b/x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx index 640dc77c77b2e..6cb753146d742 100644 --- a/x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx +++ b/x-pack/plugins/siem/public/components/timeline/body/column_headers/actions/index.tsx @@ -49,7 +49,12 @@ export const CloseButton = pure<{ aria-label={i18n.REMOVE_COLUMN} data-test-subj="remove-column" iconType="cross" - onClick={() => onColumnRemoved(columnId)} + onClick={(event: React.MouseEvent) => { + // To avoid a re-sorting when you delete a column + event.preventDefault(); + event.stopPropagation(); + onColumnRemoved(columnId); + }} /> )); diff --git a/x-pack/plugins/siem/public/graphql/introspection.json b/x-pack/plugins/siem/public/graphql/introspection.json index 31544e966a591..8665803474a54 100644 --- a/x-pack/plugins/siem/public/graphql/introspection.json +++ b/x-pack/plugins/siem/public/graphql/introspection.json @@ -2955,11 +2955,7 @@ "name": "value", "description": "", "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { "kind": "SCALAR", "name": "String", "ofType": null } - }, + "type": { "kind": "SCALAR", "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, diff --git a/x-pack/plugins/siem/public/graphql/types.ts b/x-pack/plugins/siem/public/graphql/types.ts index 4d53fd927a5fa..621603cb114de 100644 --- a/x-pack/plugins/siem/public/graphql/types.ts +++ b/x-pack/plugins/siem/public/graphql/types.ts @@ -312,7 +312,7 @@ export interface OsEcsFields { } export interface CursorType { - value: string; + value?: string | null; tiebreaker?: string | null; } @@ -2177,7 +2177,7 @@ export namespace GetAuthenticationsQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -2191,7 +2191,7 @@ export namespace GetAuthenticationsQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -2319,7 +2319,7 @@ export namespace GetDomainsQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -2333,7 +2333,7 @@ export namespace GetDomainsQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -2382,7 +2382,7 @@ export namespace GetEventsQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; tiebreaker?: string | null; }; @@ -2630,7 +2630,7 @@ export namespace GetHostsTableQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -2644,7 +2644,7 @@ export namespace GetHostsTableQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -3086,7 +3086,7 @@ export namespace GetNetworkDnsQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -3100,7 +3100,7 @@ export namespace GetNetworkDnsQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -3215,7 +3215,7 @@ export namespace GetNetworkTopNFlowQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -3229,7 +3229,7 @@ export namespace GetNetworkTopNFlowQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -3605,7 +3605,7 @@ export namespace GetTimelineQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; tiebreaker?: string | null; }; @@ -4826,7 +4826,7 @@ export namespace GetTlsQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -4840,7 +4840,7 @@ export namespace GetTlsQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -4924,7 +4924,7 @@ export namespace GetUncommonProcessesQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -4938,7 +4938,7 @@ export namespace GetUncommonProcessesQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } @@ -5009,7 +5009,7 @@ export namespace GetUsersQuery { export type Cursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; export type PageInfo = { @@ -5023,7 +5023,7 @@ export namespace GetUsersQuery { export type EndCursor = { __typename?: 'CursorType'; - value: string; + value?: string | null; }; } diff --git a/x-pack/plugins/siem/server/graphql/types.ts b/x-pack/plugins/siem/server/graphql/types.ts index 403b8747745e1..572a58a0fd00f 100644 --- a/x-pack/plugins/siem/server/graphql/types.ts +++ b/x-pack/plugins/siem/server/graphql/types.ts @@ -341,7 +341,7 @@ export interface OsEcsFields { } export interface CursorType { - value: string; + value?: string | null; tiebreaker?: string | null; } @@ -3338,16 +3338,16 @@ export namespace OsEcsFieldsResolvers { export namespace CursorTypeResolvers { export interface Resolvers { - value?: ValueResolver; + value?: ValueResolver; tiebreaker?: TiebreakerResolver; } - export type ValueResolver = Resolver< - R, - Parent, - Context - >; + export type ValueResolver< + R = string | null, + Parent = CursorType, + Context = SiemContext + > = Resolver; export type TiebreakerResolver< R = string | null, Parent = CursorType,