JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Kanban › Kanban 'addTask' fails with RROR TypeError: _a.addTask is not a function
Tagged: Kanban
- This topic has 1 reply, 2 voices, and was last updated 3 years, 4 months ago by admin.
-
AuthorPosts
-
July 6, 2021 at 9:44 am #101988davoutMember
I am trying to add a task to a Kanban component, like…
// called after the task store has added a new task this.postStoreAddSub = this.taskStore.postAddTask$.subscribe((aTask) => { if ((aTask !== null) && (aTask.id)) { if (this.dataController.withinQueryScope(aTask) === true) { this.kanbanComponent?.addTask(this.taskToObject(aTask)); } } });
This code is triggering the following error…
ERROR TypeError: _a.addTask is not a function
at SafeSubscriber._next (task-smart-kanban.component.ts:169)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
at SafeSubscriber.next (Subscriber.js:122)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at BehaviorSubject.next (Subject.js:39)
at BehaviorSubject.next (BehaviorSubject.js:30)
at TapSubscriber._tapNext (GdTask.store.ts:36)
at TapSubscriber._next (tap.js:40)
at TapSubscriber.next (Subscriber.js:49)
defaultErrorLogger @ core.js:4196
handleError @ core.js:4244
next @ core.js:27698
schedulerFn @ core.js:24536
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:24526
(anonymous) @ core.js:27170
invoke @ zone-evergreen.js:364
run @ zone-evergreen.js:123
runOutsideAngular @ core.js:27074
onHandleError @ core.js:27170
handleError @ zone-evergreen.js:368
runTask @ zone-evergreen.js:170
invokeTask @ zone-evergreen.js:480
ZoneTask.invoke @ zone-evergreen.js:469
timer @ zone-evergreen.js:2552
setTimeout (async)
scheduleTask @ zone-evergreen.js:2573
scheduleTask @ zone-evergreen.js:385
onScheduleTask @ zone-evergreen.js:272
scheduleTask @ zone-evergreen.js:378
scheduleTask @ zone-evergreen.js:210
scheduleMacroTask @ zone-evergreen.js:233
scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:1134
(anonymous) @ zone-evergreen.js:2586
proto.<computed> @ zone-evergreen.js:1449
hostReportError @ hostReportError.js:2
__tryOrUnsub @ Subscriber.js:191
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
next @ BehaviorSubject.js:30
(anonymous) @ GdTask.store.ts:36
_next @ tap.js:40
next @ Subscriber.js:49
_next @ map.js:35
next @ Subscriber.js:49
_next @ map.js:35
next @ Subscriber.js:49
_next @ filter.js:33
next @ Subscriber.js:49
notifyNext @ mergeMap.js:72
_next @ InnerSubscriber.js:11
next @ Subscriber.js:49
onLoad @ http.js:1678
invokeTask @ zone-evergreen.js:399
onInvokeTask @ core.js:27135
invokeTask @ zone-evergreen.js:398
runTask @ zone-evergreen.js:167
invokeTask @ zone-evergreen.js:480
invokeTask @ zone-evergreen.js:1621
globalZoneAwareCallback @ zone-evergreen.js:1658
load (async)
customScheduleGlobal @ zone-evergreen.js:1773
scheduleTask @ zone-evergreen.js:385
onScheduleTask @ zone-evergreen.js:272
scheduleTask @ zone-evergreen.js:378
scheduleTask @ zone-evergreen.js:210
scheduleEventTask @ zone-evergreen.js:236
(anonymous) @ zone-evergreen.js:1928
(anonymous) @ http.js:1764
_trySubscribe @ Observable.js:42
subscribe @ Observable.js:28
subscribeToResult @ subscribeToResult.js:9
_innerSub @ mergeMap.js:59
_tryNext @ mergeMap.js:53
_next @ mergeMap.js:36
next @ Subscriber.js:49
(anonymous) @ subscribeToArray.js:3
_trySubscribe @ Observable.js:42
subscribe @ Observable.js:28
call @ mergeMap.js:21
subscribe @ Observable.js:23
call @ filter.js:13
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
call @ map.js:16
subscribe @ Observable.js:23
call @ tap.js:16
subscribe @ Observable.js:23
add @ GdTask.store.ts:38
(anonymous) @ task.data.controller.ts:69
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
next @ BehaviorSubject.js:30
addNewTask @ task.ui.mediator.ts:133
addNewTask @ task-edit-form.component.ts:334
onFormSubmit @ task-edit-form.component.ts:519
TaskEditFormComponent_Template_form_ngSubmit_3_listener @ task-edit-form.component.html:15
executeListenerWithErrorHandling @ core.js:14414
wrapListenerIn_markDirtyAndPreventDefault @ core.js:14449
schedulerFn @ core.js:24557
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:24526
onSubmit @ forms.js:5575
FormGroupDirective_submit_HostBindingHandler @ forms.js:5628
executeListenerWithErrorHandling @ core.js:14414
wrapListenerIn_markDirtyAndPreventDefault @ core.js:14449
(anonymous) @ platform-browser.js:582
invokeTask @ zone-evergreen.js:399
onInvokeTask @ core.js:27135
invokeTask @ zone-evergreen.js:398
runTask @ zone-evergreen.js:167
invokeTask @ zone-evergreen.js:480
invokeTask @ zone-evergreen.js:1621
globalZoneAwareCallback @ zone-evergreen.js:1647
Show 87 more framesJuly 6, 2021 at 11:00 am #101989adminKeymasterHi davout,
You may look at https://www.htmlelements.com/angular/demos/kanban/methods/ in order to learn how to use the “addTask” method.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.