Returns whether the input element is selectable through the directive.
// get
@ViewChild('firstName',
{read: IgxTextSelectionDirective})
public firstName: IgxTextSelectionDirective;
public getFirstNameSelectionStatus() {
return this.firstName.selected;
}
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>
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();
}
Returns the nativeElement of the element where the directive was applied.