Skip to content

Commit

Permalink
Add property to disable expand collapse toggle by name
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-bulgaris-qcif committed Oct 10, 2023
1 parent 85dd28c commit cf03154
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion angular-legacy/shared/form/field-andsvocab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class ANDSVocabField extends FieldBase<any> {
public disableCheckboxRegexPattern:string;
public disableCheckboxRegexTestValue:string;
public disableCheckboxRegexCaseSensitive: boolean;
public disableExpandCollapseToggleByName: boolean;
public component:any;

constructor(options: any, injector: any) {
Expand All @@ -56,6 +57,7 @@ export class ANDSVocabField extends FieldBase<any> {
this.disableCheckboxRegexPattern = options['disableCheckboxRegexPattern'] || "";
this.disableCheckboxRegexTestValue = options['disableCheckboxRegexTestValue'] || "";
this.disableCheckboxRegexCaseSensitive = options['disableCheckboxRegexCaseSensitive'] || true;
this.disableExpandCollapseToggleByName = options['disableExpandCollapseToggleByName'] || false;

this.andsService = this.getFromInjector(ANDSService);
}
Expand Down Expand Up @@ -300,7 +302,9 @@ export class ANDSVocabComponent extends SimpleComponent {
break;
}

this.expandCollapseNode(event.node);
if(!this.field.disableExpandCollapseToggleByName) {
this.expandCollapseNode(event.node);
}
}

protected updateSingleNodeSelectedState(node, state) {
Expand Down

0 comments on commit cf03154

Please sign in to comment.