Skip to content

Commit

Permalink
update text fields on blur
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas committed Sep 26, 2024
1 parent 65135c0 commit 1659464
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 13 deletions.
5 changes: 0 additions & 5 deletions frontend/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export type EpisodeAgentType = EpisodeEntityLink & {
agent: AgentDescriptionType;
certainty: Certainty;
entity: EntityDescription;
entityType: Entity;
episode: EpisodeType;
id: Scalars['ID']['output'];
note?: Maybe<Scalars['String']['output']>;
Expand All @@ -212,7 +211,6 @@ export type EpisodeCategoryType = {

export type EpisodeEntityLink = {
entity: EntityDescription;
entityType: Entity;
episode: EpisodeType;
id: Scalars['ID']['output'];
note?: Maybe<Scalars['String']['output']>;
Expand All @@ -223,7 +221,6 @@ export type EpisodeGiftType = EpisodeEntityLink & {
__typename?: 'EpisodeGiftType';
certainty: Certainty;
entity: EntityDescription;
entityType: Entity;
episode: EpisodeType;
gift: GiftDescriptionType;
id: Scalars['ID']['output'];
Expand All @@ -235,7 +232,6 @@ export type EpisodeLetterType = EpisodeEntityLink & {
__typename?: 'EpisodeLetterType';
certainty: Certainty;
entity: EntityDescription;
entityType: Entity;
episode: EpisodeType;
id: Scalars['ID']['output'];
letter: LetterDescriptionType;
Expand All @@ -247,7 +243,6 @@ export type EpisodeSpaceType = EpisodeEntityLink & {
__typename?: 'EpisodeSpaceType';
certainty: Certainty;
entity: EntityDescription;
entityType: Entity;
episode: EpisodeType;
id: Scalars['ID']['output'];
note?: Maybe<Scalars['String']['output']>;
Expand Down
5 changes: 0 additions & 5 deletions frontend/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ type EpisodeAgentType implements EpisodeEntityLink {
agent: AgentDescriptionType!
certainty: Certainty!
entity: EntityDescription!
entityType: Entity!
episode: EpisodeType!
id: ID!
note: String
Expand All @@ -187,7 +186,6 @@ type EpisodeCategoryType {

interface EpisodeEntityLink {
entity: EntityDescription!
entityType: Entity!
episode: EpisodeType!
id: ID!
note: String
Expand All @@ -197,7 +195,6 @@ interface EpisodeEntityLink {
type EpisodeGiftType implements EpisodeEntityLink {
certainty: Certainty!
entity: EntityDescription!
entityType: Entity!
episode: EpisodeType!
gift: GiftDescriptionType!
id: ID!
Expand All @@ -208,7 +205,6 @@ type EpisodeGiftType implements EpisodeEntityLink {
type EpisodeLetterType implements EpisodeEntityLink {
certainty: Certainty!
entity: EntityDescription!
entityType: Entity!
episode: EpisodeType!
id: ID!
letter: LetterDescriptionType!
Expand All @@ -219,7 +215,6 @@ type EpisodeLetterType implements EpisodeEntityLink {
type EpisodeSpaceType implements EpisodeEntityLink {
certainty: Certainty!
entity: EntityDescription!
entityType: Entity!
episode: EpisodeType!
id: ID!
note: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export class AgentDescriptionFormComponent implements OnDestroy {
gender: new FormGroup({
gender: new FormControl<string>(Gender.Unknown),
sourceMention: new FormControl<SourceMention>(SourceMention.Direct),
note: new FormControl<string>(''),
note: new FormControl<string>('', { updateOn: 'blur' }),
}),
location: new FormGroup({
hasLocation: new FormControl<boolean>(false, { nonNullable: true }),
location: new FormControl<string | null>(null),
sourceMention: new FormControl<SourceMention>(SourceMention.Direct),
note: new FormControl<string>(''),
note: new FormControl<string>('', { updateOn: 'blur' }),
})
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class AgentIdentificationFormComponent implements OnDestroy {
form = new FormGroup({
name: new FormControl<string>('', {
nonNullable: true,
updateOn: 'blur',
validators: [Validators.required]
}),
description: new FormControl<string>('', { nonNullable: true }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class EpisodeContentsFormComponent implements OnInit, OnDestroy {
public form = new FormGroup({
summary: new FormControl<string>("", {
nonNullable: true,
updateOn: 'blur',
}),
categories: new FormControl<string[]>([], {
nonNullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class EpisodeIdentificationFormComponent implements OnDestroy {
public form = new FormGroup<EpisodeIdentificationForm>({
name: new FormControl<string>("", {
nonNullable: true,
updateOn: 'blur',
validators: [Validators.required],
}),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class GiftIdentificationFormComponent implements OnInit {
name: new FormControl("", {
validators: [Validators.required],
nonNullable: true,
updateOn: 'blur',
}),
description: new FormControl("", {
nonNullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class LetterIdentificationFormComponent implements OnInit {
name: new FormControl("", {
validators: [Validators.required],
nonNullable: true,
updateOn: 'blur',
}),
description: new FormControl("", {
nonNullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class EpisodeLinkFormComponent implements OnChanges, OnDestroy {
data$: Observable<DataEntryEpisodeEntityLinkQuery | undefined>;
form = new FormGroup({
sourceMention: new FormControl<SourceMention>(SourceMention.Direct),
note: new FormControl<string>('', { nonNullable: true }),
note: new FormControl<string>('', { nonNullable: true, updateOn: 'blur' }),
});

sourceMentionOptions: SelectOptions<SourceMention> = sourceMentionSelectOptions();
Expand Down

0 comments on commit 1659464

Please sign in to comment.