diff --git a/docs/dataview/api/api_overview.md b/docs/dataview/api/api_overview.md index 6570eb06..a3b4402d 100644 --- a/docs/dataview/api/api_overview.md +++ b/docs/dataview/api/api_overview.md @@ -15,6 +15,7 @@ description: You can explore the API of DataView in the documentation of the DHT | [](dataview/api/dataview_getfocus_method.md) | @getshort(dataview/api/dataview_getfocus_method.md) | | [](dataview/api/dataview_getfocusitem_method.md) | @getshort(dataview/api/dataview_getfocusitem_method.md) | | [](dataview/api/dataview_paint_method.md) | @getshort(dataview/api/dataview_paint_method.md) | +| [](dataview/api/dataview_resetfocus_method.md) | @getshort(dataview/api/dataview_resetfocus_method.md) | | [](dataview/api/dataview_setfocus_method.md) | @getshort(dataview/api/dataview_setfocus_method.md) | :::info important diff --git a/docs/dataview/api/dataview_focuschange_event.md b/docs/dataview/api/dataview_focuschange_event.md index de13150a..a6228b1e 100644 --- a/docs/dataview/api/dataview_focuschange_event.md +++ b/docs/dataview/api/dataview_focuschange_event.md @@ -8,17 +8,22 @@ description: You can explore the focusChange event of DataView in the documentat @short: fires on moving focus to a new item -@signature: {'focusChange: (focusIndex: number, id: string | number) => void;'} +@signature: {'focusChange: (focusIndex?: number, id?: string | number) => void;'} @params: -- `focusIndex: number` - the position of an item in focus -- `id: string | number` - the id of the item +The callback of the **focusChange** event is called with the following parameters: + +- `focusIndex` - (optional) the position of an item in focus +- `id` - (optional) the id of the item @example: -dataview.events.on("focusChange", function(index, id){ +dataview.events.on("focusChange", function(focusIndex, id){ // your code here }); @descr: **Related sample**: [Dataview. Events](https://snippet.dhtmlx.com/2d74uyoh) + +@changelog: +- Parameters of the callback function became optional in v8.3.14 diff --git a/docs/dataview/api/dataview_resetfocus_method.md b/docs/dataview/api/dataview_resetfocus_method.md new file mode 100644 index 00000000..9829fd6f --- /dev/null +++ b/docs/dataview/api/dataview_resetfocus_method.md @@ -0,0 +1,20 @@ +--- +sidebar_label: resetFocus() +title: JavaScript DataView - resetFocus Method +description: You can explore the resetFocus method of DataView in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite. +--- + +# resetFocus() + +@short: resets focus and moves the scroll to the beginning of the dataview + +@signature: {'resetFocus(): void;'} + +@example: +dataview.resetFocus(); + +@descr: + + +@changelog: +added in v8.4 \ No newline at end of file diff --git a/docs/list/api/api_overview.md b/docs/list/api/api_overview.md index 112a4e68..ae8eeb9f 100644 --- a/docs/list/api/api_overview.md +++ b/docs/list/api/api_overview.md @@ -15,6 +15,7 @@ description: You can explore the API of List in the documentation of the DHTMLX | [](list/api/list_getfocus_method.md) | @getshort(list/api/list_getfocus_method.md) | | [](list/api/list_getfocusitem_method.md) | @getshort(list/api/list_getfocusitem_method.md) | | [](list/api/list_paint_method.md) | @getshort(list/api/list_paint_method.md) | +| [](list/api/list_resetfocus_method.md) | @getshort(list/api/list_resetfocus_method.md) | | [](list/api/list_setfocus_method.md) | @getshort(list/api/list_setfocus_method.md) | :::info important diff --git a/docs/list/api/list_focuschange_event.md b/docs/list/api/list_focuschange_event.md index db89b764..e5c5befa 100644 --- a/docs/list/api/list_focuschange_event.md +++ b/docs/list/api/list_focuschange_event.md @@ -8,17 +8,22 @@ description: You can explore the focusChange event of List in the documentation @short: fires on moving focus to a new item -@signature: {'focusChange: (focusIndex: number, id: string | number) => void;'} +@signature: {'focusChange: (focusIndex?: number, id?: string | number) => void;'} @params: -- `focusIndex: number` - the position of an item -- `id: string | number` - the id of an item +The callback of the **focusChange** event is called with the following parameters: + +- `focusIndex` - (optional) the position of an item +- `id` - (optional) the id of an item @example: -list.events.on("focusChange", function(index, id){ +list.events.on("focusChange", function(focusIndex, id){ // your code here }); @descr: **Related sample**: [List. Events](https://snippet.dhtmlx.com/iwt1yd61) + +@changelog: +- Parameters of the callback function became optional in v8.3.14 \ No newline at end of file diff --git a/docs/list/api/list_resetfocus_method.md b/docs/list/api/list_resetfocus_method.md new file mode 100644 index 00000000..18e5ba65 --- /dev/null +++ b/docs/list/api/list_resetfocus_method.md @@ -0,0 +1,20 @@ +--- +sidebar_label: resetFocus() +title: JavaScript List - resetFocus Method +description: You can explore the resetFocus method of List in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite. +--- + +# resetFocus() + +@short: resets focus and moves the scroll to the beginning of the list + +@signature: {'resetFocus(): void;'} + +@example: +list.resetFocus(); + +@descr: + + +@changelog: +added in v8.4 \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 58035d4e..0674b3d1 100644 --- a/sidebars.js +++ b/sidebars.js @@ -591,6 +591,7 @@ module.exports = { "dataview/api/dataview_getfocus_method", "dataview/api/dataview_getfocusitem_method", "dataview/api/dataview_paint_method", + "dataview/api/dataview_resetfocus_method", "dataview/api/dataview_setfocus_method", ], }, @@ -2992,6 +2993,7 @@ module.exports = { "list/api/list_getfocus_method", "list/api/list_getfocusitem_method", "list/api/list_paint_method", + "list/api/list_resetfocus_method", "list/api/list_setfocus_method", ], },