I'm using devextreme components in my angular web app. Now, I'm trying to show a popup, if the user clicks on a toolbar button. I bind the popup visibility to a boolean property in the component. The problem is, that the popup isn't showing. For test purposes, I added a simply alert message in the click event of the component and the message is showing. It means, that the click event is calling, but the popul will not show.
Here is the toolbar template:
<dx-toolbar>
<dxi-item location="before" widget="dxButton"
[options]="{text: 'Új partner', type: 'default', stylingMode: 'contained', icon: 'fas fa-plus', onClick: add_onClick}"
>
</dxi-item>
<dxi-item location="center" text="Partnerek"></dxi-item>
</dx-toolbar>
The popup template:
<dx-popup
id="entity-popup"
[width]="400"
height="auto"
[showTitle]="true"
title="Partner"
[(visible)]="entityPopupVisible"
[dragEnabled]="false"
[closeOnOutsideClick]="false">
</dx-popup>
And here the component:
import { Component } from '@angular/core';
import { SenderRepository } from '../../repositories/sender.repository'
import { Sender } from '../../models/sender.model';
@Component({
selector: "sender-table",
templateUrl: "./senderTable.component.html"
})
export class SenderTableComponent {
entityPopupVisible = false;
constructor(private repo: SenderRepository) { }
get senders(): Sender[] {
return this.repo.senders;
}
public add_onClick() {
this.entityPopupVisible = true;
alert("onclick");
}
}
What goes here wrong? Thank you.