Skip to content

Commit 3e958ed

Browse files
[update] fix internal methods description
1 parent ef0a180 commit 3e958ed

8 files changed

Lines changed: 119 additions & 16 deletions

docs/api/api_overview.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ new booking.Booking("#root", {
2929

3030
### Event Bus methods
3131

32-
| Name | Description |
33-
| ------------------------------------------------------- | ---------------------------------------------------------- |
34-
| [](api/internal/js_booking_exec_method.md) | @getshort(api/internal/js_booking_exec_method.md) |
35-
| [](api/internal/js_booking_intercept_method.md) | @getshort(api/internal/js_booking_intercept_method.md) |
36-
| [](api/internal/js_booking_on_method.md) | @getshort(api/internal/js_booking_on_method.md) |
37-
| [](api/internal/js_booking_setnext_method.md) | @getshort(api/internal/js_booking_setnext_method.md) |
32+
| Name | Description |
33+
| ---------------------------------------- | ----------------------------------------------- |
34+
| [](api/internal/js_booking_exec.md) | @getshort(api/internal/js_booking_exec.md) |
35+
| [](api/internal/js_booking_intercept.md) | @getshort(api/internal/js_booking_intercept.md) |
36+
| [](api/internal/js_booking_on.md) | @getshort(api/internal/js_booking_on.md) |
37+
| [](api/internal/js_booking_setnext.md) | @getshort(api/internal/js_booking_setnext.md) |
3838

3939
### State methods
4040

41-
| Name | Description |
42-
| ------------------------------------------------------- | -------------------------------------------------------------- |
43-
| [](api/internal/booking_innermethodname_method.md) | @getshort(api/internal/booking_innermethodname_method.md) |
41+
| Name | Description |
42+
| ----------------------------------------------- | ------------------------------------------------------ |
43+
| [](api/internal/js_booking_getreactivestate.md) | @getshort(api/internal/js_booking_getreactivestate.md) |
44+
| [](api/internal/js_booking_getstate.md) | @getshort(api/internal/js_booking_getstate.md) |
4445

4546
### RestDataProvider methods
4647

File renamed without changes.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
sidebar_label: api.getReactiveState()
3+
title: getReactiveState Method
4+
description: You can learn about the getReactiveState method in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
5+
---
6+
7+
# api.getReactiveState()
8+
9+
### Description
10+
11+
@short: Gets an object with the reactive properties of Booking
12+
13+
### Usage
14+
15+
~~~jsx {}
16+
api.getReactiveState(): object;
17+
~~~
18+
19+
### Returns
20+
21+
The method returns an object with the following parameters:
22+
23+
~~~jsx {}
24+
{
25+
cards,
26+
cardShape,
27+
filteredCards,
28+
filterShape,
29+
formShape,
30+
... TODO
31+
}
32+
~~~
33+
34+
### Example
35+
36+
~~~jsx {7-8,10-13}
37+
// create Booking
38+
const booking = new booking.Booking("#root", {
39+
cards,
40+
cardShape
41+
});
42+
43+
// get the Reactive State of Booking
44+
const state = booking.api.getReactiveState();
45+
46+
// subscribe on the cards changes and output the array of cards
47+
state.cards.subscribe((data) => {
48+
console.log(data);
49+
});
50+
~~~
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
sidebar_label: api.getState()
3+
title: getState Method
4+
description: You can learn about the getState method in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
5+
---
6+
7+
# api.getState()
8+
9+
### Description
10+
11+
@short: Gets an object with the StateStore properties of Booking
12+
13+
### Usage
14+
15+
~~~jsx {}
16+
api.getState(): object;
17+
~~~
18+
19+
### Returns
20+
21+
The method returns an object with the following parameters of state:
22+
23+
~~~jsx {}
24+
{
25+
cards,
26+
cardShape,
27+
filteredCards,
28+
filterShape,
29+
filterData,
30+
formShape,
31+
... TODO
32+
}
33+
~~~
34+
35+
### Example
36+
37+
~~~jsx {7-11}
38+
// create Booking
39+
const booking = new booking.Booking("#root", {
40+
cards,
41+
cardShape
42+
});
43+
44+
// get the State of Kanban
45+
const state = booking.api.getState();
46+
console.log(state.cards); // output the cards data
47+
console.log(state.cardShape); // output the card configuration
48+
console.log(state.formShape); // output the editor configuration
49+
//...
50+
~~~
51+
52+
**Related articles:**
File renamed without changes.
File renamed without changes.

sidebars.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ module.exports = {
4343
collapsed: true,
4444
items: [
4545
//"api/internal/booking_innermethodname_method",
46-
"api/internal/js_booking_exec_method",
47-
"api/internal/js_booking_intercept_method",
48-
"api/internal/js_booking_on_method",
49-
"api/internal/js_booking_setnext_method"
46+
"api/internal/js_booking_exec",
47+
"api/internal/js_booking_intercept",
48+
"api/internal/js_booking_on",
49+
"api/internal/js_booking_setnext",
5050
]
5151
},
5252
{
@@ -55,9 +55,9 @@ module.exports = {
5555
collapsible: true,
5656
collapsed: true,
5757
items: [
58-
"api/internal/booking_innermethodname_method",
59-
//"api/internal/js_kanban_getreactivestate_method",
60-
//"api/internal/js_kanban_getstate_method",
58+
// "api/internal/booking_innermethodname_method",
59+
"api/internal/js_booking_getreactivestate",
60+
"api/internal/js_booking_getstate",
6161
]
6262
},
6363
{

0 commit comments

Comments
 (0)