LP2002327 Disable spellcheck for eg-combobox collab/sleary/lp2002327-disable-userdata-spellcheck-wip
authorStephanie Leary <stephanie.leary@equinoxOLI.org>
Mon, 9 Jan 2023 16:23:59 +0000 (10:23 -0600)
committerStephanie Leary <stephanie.leary@equinoxOLI.org>
Mon, 9 Jan 2023 16:23:59 +0000 (10:23 -0600)
Adds a spellcheck option to eg-combobox for use with free text boxes
that do not include sensitive data, but sets it to false by default.

Signed-off-by: Stephanie Leary <stephanie.leary@equinoxOLI.org>
Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html
Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts

index e498670..f73143a 100644 (file)
@@ -38,7 +38,8 @@
       (blur)="onBlur()"
       container="body"
       (selectItem)="selectorChanged($event)"
-      #instance="ngbTypeahead"/>
+      #instance="ngbTypeahead"
+      [spellcheck]="spellcheck" />
     <div class="d-flex flex-column icons" (click)="openMe($event)">
       <span class="material-icons">keyboard_arrow_up</span>
       <span class="material-icons">keyboard_arrow_down</span>
index 735f44a..ed612c5 100644 (file)
@@ -73,6 +73,11 @@ export class ComboboxComponent
 
     @Input() allowFreeText = false;
 
+    // Set this to true for free text inputs only if the data is not sensitive.
+    // Do not allow spellchecking for users' personal data, like names and government IDs,
+    // since some browsers use remote services to check spelling.
+    @Input() spellcheck = false;
+
     @Input() inputSize: number = null;
 
     // If true, applies form-control-sm CSS