Skip to content

Commit d606ce5

Browse files
Tabs: update items (DevExpress#6984) (DevExpress#6990)
1 parent c42016b commit d606ce5

File tree

1 file changed

+15
-0
lines changed
  • api-reference/10 UI Components/dxTabs/1 Configuration/items

1 file changed

+15
-0
lines changed

api-reference/10 UI Components/dxTabs/1 Configuration/items/items.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,18 @@ type: Array<String, dxTabsItem, any>
44
firedEvents: optionChanged
55
inheritsType: dxTabsItem
66
---
7+
The **items** array can contain:
8+
9+
- Strings
10+
- Objects with fields described in this section. If you want use other fields, specify the [itemTemplate](/api-reference/10%20UI%20Components/CollectionWidget/1%20Configuration/itemTemplate.md '{basewidgetpath}/Configuration/#itemTemplate').
11+
12+
If you need to update the UI component items, reassign the **items** array as shown in the following example:
13+
14+
<!--JavaScript-->
15+
{widgetName}Instance.option('items', newItems);
16+
17+
[note] If you use this method, all tabs are re-rendered. To prevent this, set [repaintChangesOnly](/Documentation/ApiReference/UI_Components/dxTabs/Configuration/#repaintChangesOnly) to `true`.
18+
19+
As an alternative to **items**, you can use the [dataSource](/api-reference/10%20UI%20Components/CollectionWidget/1%20Configuration/dataSource.md '{basewidgetpath}/Configuration/#dataSource') property. It accepts the [DataSource](/api-reference/30%20Data%20Layer/DataSource '/Documentation/ApiReference/Data_Layer/DataSource/') object, whose underlying [stores](/concepts/70%20Data%20Binding/5%20Data%20Layer/1%20Creating%20DataSource/3%20What%20Are%20Stores.md '/Documentation/Guide/Data_Binding/Data_Layer/#Creating_DataSource/What_Are_Stores') provide an [API](/concepts/70%20Data%20Binding/5%20Data%20Layer/3%20Data%20Modification '/Documentation/Guide/Data_Binding/Data_Layer/#Data_Modification') that allows you to update individual items without reassigning the entire item collection.
20+
21+
[note] Do not use the **items** property if you use **dataSource**, and vice versa.

0 commit comments

Comments
 (0)