Skip to content

Commit

Permalink
not allow empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
shb0527 committed Jul 19, 2024
1 parent 12ed04b commit 670f8bf
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ModuleInfo } from '../moduleInfo';
import { environment } from 'src/environments/environment';
import { CombinatorialDesignEditorComponent } from '../combinatorial-design-editor/combinatorial-design-editor.component';
// import { ThrowStmt } from '@angular/compiler';

import { FormControl, Validators } from '@angular/forms';

@Component({
Expand Down Expand Up @@ -138,16 +139,17 @@ export class InfoEditorComponent implements OnInit {
}



inputChange(event: any) {
const id = event.target.id;

switch (id) {
case 'displayID': {
const replaced = event.target.value.replace(/[\W_]+/g, '_');
if (this.glyphInfo != null) {

this.glyphInfo.displayID = replaced;
if(replaced !== ''){
//this.promptDisplayID();
this.glyphInfo.displayID = replaced;
}
} else if (this.interactionInfo != null) {
this.interactionInfo.displayID = replaced;
} else if (this.moduleInfo) {
Expand Down

0 comments on commit 670f8bf

Please sign in to comment.