Skip to content

Commit

Permalink
Add minor fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiipylypchuk1991 committed Jun 10, 2024
1 parent 7a8d346 commit 6522375
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/guides/integration_with_angular.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Open the **todo.component.ts** file and complete the `ngOnInit()` method as in:
ngOnInit() {
const todo = new ToDo(this.container.nativeElement,{ /*...*/ });

todo.events.on("add-task", (obj) => {
todo.api.on("add-task", (obj) => {
console.log("A new task is added", obj);
});
}
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/integration_with_react.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Open **ToDo.jsx** and complete the `useEffect()` method in the following way:
useEffect(() => {
const todo = new ToDo(container.current, {});

todo.events.on("add-task", (obj) => {
todo.api.on("add-task", (obj) => {
console.log("A new task is added", obj);
});

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/integration_with_svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Open ***ToDo.svelte*** and complete the `onMount()` method as in:
~~~jsx title="ToDo.svelte"
onMount(() => {
const todo = new ToDo(container, { columns, cards });
todo.events.on("add-task", (obj) => {
todo.api.on("add-task", (obj) => {
console.log("A new task is added", obj);
});
});
Expand Down
30 changes: 17 additions & 13 deletions docs/guides/integration_with_vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Open ***ToDo.vue*** and complete the `mounted()` method:
// ...
mounted() {
this.todo = new ToDo(this.$refs.cont, {});
this.todo.events.on("add-card", (obj) => {
this.todo.api.on("add-card", (obj) => {
console.log(obj.columnId);
});
}
Expand All @@ -277,24 +277,28 @@ To add the component into the app, open the **App.vue** file and replace the def

~~~html title="App.vue"
<script>
import ToDo from "./components/ToDo.vue";
import { getData } from "./data";
export default {
components: { ToDo },
data() {
const { columns, cards } = getData();
return { columns, cards };
}
};
import ToDo from "./components/ToDo.vue";
import { getData } from "./data";
export default {
components: { ToDo },
data() {
const { users, projects, tasks } = getData();
return {
users,
projects,
tasks
};
}
};
</script>

<template>
<ToDo :columns="columns" :cards="cards" />
<ToDo :users="users" :tasks="tasks" :projects="projects" />
</template>
~~~

After that, when you can start the app to see To Do List loaded with data on a page.
After that, you can start the app to see To Do List loaded with data on a page.

![To Do List initialization](../assets/trial_todolist.png)

Expand Down

0 comments on commit 6522375

Please sign in to comment.