Reputation: 35
In my code, I need to display a message for 5 seconds and then it should disappear. I'm using Fuse Messages and could not succeed on showing then hiding the message. Here is my code below. What should I do and what am I doing wrong?
TS:
if (koliList.length == 1) {
if (this.addPackage(koliList[0], frmControlKoliBarkod) == false) {
let message = this._messages.Show("Transaction is Successful", "WARNING", 5);
setTimeout(() => {
message;
}, 5000);
return;
}
}
Upvotes: 1
Views: 2342
Reputation: 11
make following changes in code.
setTimeout(() => { this.message=""; }, 5000); return this.message;
This will set message to empty string after 5 seconds.
Upvotes: 1