I have a problem with performing this action:
I am looking for the click to be made after performing a series of steps automatically, that is, to simulate the click that the user should make.
What I have tried is the following, but it doesn't work for me:
<mat-tab-group>
<mat-tab id="listaODs" label="Lista de Órdenes">
<div class="row">
<div class="col-md-12">
<mat-table class="mat-table__wrapper" [dataSource]="listOrdenesDespacho"
#MatSort="matSort" matSort perfectScrollbar>
<!-- ... -->
const input = document.getElementById("listaODs") as HTMLInputElement | null
input.click()
Hello, I don't know if you mean that when the click is made, an event is fired, if that is what you need, you can try the following code
and in the .ts file
First of all, I think I didn't make it clear what the requirement was; The issue is that after performing a series of steps, my goal was to automatically click to return to the previous tab.
The solution was to make use of
@ViewChild
, leaving the code like this:Components:
HTML: