Skip to content

Commit

Permalink
fix tab issues when tabbing in the option field
Browse files Browse the repository at this point in the history
  • Loading branch information
asumandang committed Oct 18, 2023
1 parent 1b14b16 commit 143fec3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/draftpoll/draftpoll.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { environment } from 'src/environments/environment';

import { unique_name_validator$ } from '../sharedcomponents/unique-form-validator';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'
import { map, startWith } from 'rxjs/operators'

type option_data_t = { oid?, name?, desc?, url?, ratings? };

Expand Down Expand Up @@ -863,6 +863,7 @@ export class DraftpollPage implements OnInit {

existingOptionName$(currentControlName: string): Observable<string[]> {
return this.formGroup.valueChanges.pipe(
startWith({}),
map(values => {
const optionNameKeys = Object.keys(values as Object).filter(k => { return k.includes('option_name') && k !== currentControlName })
const existingOptionNames: string[] = [];
Expand Down

0 comments on commit 143fec3

Please sign in to comment.