Skip to content

Commit e478346

Browse files
authored
Update notification-toaster.yaml
fixed a bug on the default duration
1 parent 648990f commit e478346

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

power-apps/Notification-Toaster/source/notification-toaster.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ ComponentDefinitions:
2929
DataType: Text
3030
Default: =""
3131
- Duration:
32-
Description: Notification duration in milliseconds
32+
Description: A parameter
3333
IsOptional: true
3434
DataType: Number
35-
Default: =Blank()
35+
Default: =0
3636
Theme:
3737
PropertyKind: Input
3838
DisplayName: Theme
@@ -180,8 +180,7 @@ ComponentDefinitions:
180180
=With({FirstNotif:First(colNotifications)},
181181
Coalesce(
182182
vRemoveNotif,
183-
FirstNotif.Duration,
184-
IfError((Len(FirstNotif.Title)+Len(FirstNotif.Text))/NotificationToaster.Theme.ReadingSpeed*1000,3500))
183+
If(FirstNotif.Duration=0,IfError((Len(FirstNotif.Title)+Len(FirstNotif.Text))/NotificationToaster.Theme.ReadingSpeed*1000,3500),FirstNotif.Duration))
185184
)
186185
OnSelect: =Collect(colNotifications,FirstN([{ID:1,Title:"",Text:"",Duration:1000}],0))
187186
OnTimerEnd: |-

0 commit comments

Comments
 (0)