IgxTextSelectionDirective

new IgxTextSelectionDirective(): IgxTextSelectionDirective

Returns IgxTextSelectionDirective

Determines whether the input element could be selected through the directive.

<!--set-->
<input
  type="text"
  id="firstName"
  [igxTextSelection]="true">
</input>

<input
  type="text"
  id="lastName"
  igxTextSelection
  [selected]="true">
</input>
selected: boolean = true

Defined in projects/igniteui-angular/directives/src/directives/text-selection/text-selection.directive.ts:31

Returns the nativeElement of the element where the directive was applied.

<input
  type="text"
  id="firstName"
  igxTextSelection>
</input>
@ViewChild('firstName',
 {read: IgxTextSelectionDirective})
public inputElement: IgxTextSelectionDirective;

public getNativeElement() {
 return this.inputElement.nativeElement;
}
get nativeElement(): any

Defined in projects/igniteui-angular/directives/src/directives/text-selection/text-selection.directive.ts:54

Returns any

Triggers the selection of the element if it is marked as selectable.

<input
  type="text"
  id="firstName"
  igxTextSelection>
</input>
@ViewChild('firstName',
 {read: IgxTextSelectionDirective})
public inputElement: IgxTextSelectionDirective;

public triggerElementSelection() {
 this.inputElement.trigger();
}
trigger(): void

Defined in projects/igniteui-angular/directives/src/directives/text-selection/text-selection.directive.ts:88

Returns void