Skip to content

Commit 0d1f33f

Browse files
React Inline Content Doc: Add Init. Info, Restructure, Links (#8876)
1 parent d26a11c commit 0d1f33f

5 files changed

Lines changed: 131 additions & 43 deletions

File tree

api-reference/10 UI Components/dxDropDownBox/1 Configuration/contentTemplate.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default: 'content'
55
---
66
---
77
##### shortDescription
8-
Specifies a custom template for the drop-down content.
8+
Specifies a custom template for drop-down content.
99

1010
##### param(templateData): Object
1111
Data associated with the UI component.
@@ -28,5 +28,30 @@ A template name or container.
2828
}
2929

3030
#####See Also#####
31+
32+
---
33+
34+
##### jQuery
35+
3136
- [DropDownBox - Getting Started](/concepts/05%20UI%20Components/DropDownBox/00%20Getting%20Started%20with%20DropDownBox '/Documentation/Guide/UI_Components/DropDownBox/Getting_Started_with_DropDownBox/')
32-
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
37+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
38+
39+
##### Angular
40+
41+
- [DropDownBox - Getting Started](/concepts/05%20UI%20Components/DropDownBox/00%20Getting%20Started%20with%20DropDownBox '/Documentation/Guide/UI_Components/DropDownBox/Getting_Started_with_DropDownBox/')
42+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
43+
- [Declare Content in the Markup](/Documentation/Guide/Angular_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
44+
45+
##### Vue
46+
47+
- [DropDownBox - Getting Started](/concepts/05%20UI%20Components/DropDownBox/00%20Getting%20Started%20with%20DropDownBox '/Documentation/Guide/UI_Components/DropDownBox/Getting_Started_with_DropDownBox/')
48+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
49+
- [Declare Content in the Markup](/Documentation/Guide/Vue_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
50+
51+
##### React
52+
53+
- [DropDownBox - Getting Started](/concepts/05%20UI%20Components/DropDownBox/00%20Getting%20Started%20with%20DropDownBox '/Documentation/Guide/UI_Components/DropDownBox/Getting_Started_with_DropDownBox/')
54+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
55+
- [Declare Content in the Markup](/Documentation/Guide/React_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
56+
57+
---

api-reference/10 UI Components/dxOverlay/1 Configuration/contentTemplate.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,30 @@ A template name or container.
2020
}
2121

2222
#####See Also#####
23+
24+
---
25+
26+
##### jQuery
27+
2328
- [Customize the Content](/concepts/05%20UI%20Components/Popover/05%20Customize%20the%20Appearance/05%20Customize%20the%20Content '/Documentation/Guide/UI_Components/{WidgetName}/Customize_the_Appearance/Customize_the_Content/')
24-
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
29+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
30+
31+
##### Angular
32+
33+
- [Customize the Content](/concepts/05%20UI%20Components/Popover/05%20Customize%20the%20Appearance/05%20Customize%20the%20Content '/Documentation/Guide/UI_Components/{WidgetName}/Customize_the_Appearance/Customize_the_Content/')
34+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
35+
- [Declare Content in the Markup](/Documentation/Guide/Angular_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
36+
37+
##### Vue
38+
39+
- [Customize the Content](/concepts/05%20UI%20Components/Popover/05%20Customize%20the%20Appearance/05%20Customize%20the%20Content '/Documentation/Guide/UI_Components/{WidgetName}/Customize_the_Appearance/Customize_the_Content/')
40+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
41+
- [Declare Content in the Markup](/Documentation/Guide/Vue_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
42+
43+
##### React
44+
45+
- [Customize the Content](/concepts/05%20UI%20Components/Popover/05%20Customize%20the%20Appearance/05%20Customize%20the%20Content '/Documentation/Guide/UI_Components/{WidgetName}/Customize_the_Appearance/Customize_the_Content/')
46+
- [Custom Templates](/concepts/05%20UI%20Components/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
47+
- [Declare Content in the Markup](/Documentation/Guide/React_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
48+
49+
---

api-reference/10 UI Components/dxToast/1 Configuration/contentTemplate.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,30 @@
33

44
---
55
#####See Also#####
6+
7+
---
8+
9+
##### jQuery
10+
611
- [Customize Toast Content](/Documentation/Guide/UI_Components/Toast/Getting_Started_with_Toast/#Customize_Toast_Content)
7-
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
12+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
13+
14+
##### Angular
15+
16+
- [Customize Toast Content](/Documentation/Guide/UI_Components/Toast/Getting_Started_with_Toast/#Customize_Toast_Content)
17+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
18+
- [Declare Content in the Markup](/Documentation/Guide/Angular_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
19+
20+
##### Vue
21+
22+
- [Customize Toast Content](/Documentation/Guide/UI_Components/Toast/Getting_Started_with_Toast/#Customize_Toast_Content)
23+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
24+
- [Declare Content in the Markup](/Documentation/Guide/Vue_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
25+
26+
##### React
27+
28+
- [Customize Toast Content](/Documentation/Guide/UI_Components/Toast/Getting_Started_with_Toast/#Customize_Toast_Content)
29+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
30+
- [Declare Content in the Markup](/Documentation/Guide/React_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
31+
32+
---

api-reference/10 UI Components/dxTooltip/1 Configuration/contentTemplate.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,30 @@
77
}
88

99
#####See Also#####
10+
11+
---
12+
13+
##### jQuery
14+
1015
- [Customize the Content](/concepts/05%20Widgets/Tooltip/10%20Customize%20the%20Content '/Documentation/Guide/UI_Components/Tooltip/Customize_the_Content/')
11-
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
16+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
17+
18+
##### Angular
19+
20+
- [Customize the Content](/concepts/05%20Widgets/Tooltip/10%20Customize%20the%20Content '/Documentation/Guide/UI_Components/Tooltip/Customize_the_Content/')
21+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
22+
- [Declare Content in the Markup](/Documentation/Guide/Angular_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
23+
24+
##### Vue
25+
26+
- [Customize the Content](/concepts/05%20Widgets/Tooltip/10%20Customize%20the%20Content '/Documentation/Guide/UI_Components/Tooltip/Customize_the_Content/')
27+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
28+
- [Declare Content in the Markup](/Documentation/Guide/Vue_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
29+
30+
##### React
31+
32+
- [Customize the Content](/concepts/05%20Widgets/Tooltip/10%20Customize%20the%20Content '/Documentation/Guide/UI_Components/Tooltip/Customize_the_Content/')
33+
- [Custom Templates](/concepts/05%20Widgets/zz%20Common/30%20Templates/10%20Custom%20Templates.md '/Documentation/Guide/UI_Components/Common/Templates/#Custom_Templates')
34+
- [Declare Content in the Markup](/Documentation/Guide/React_Components/Component_Configuration_Syntax/#Declare_Content_in_the_Markup)
35+
36+
---
Lines changed: 26 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The following UI components allow you to declare their content directly in the markup:
1+
The following UI components allow you to declare content directly in the markup (inline):
22

33
- [Drawer](/api-reference/10%20UI%20Components/dxDrawer '/Documentation/ApiReference/UI_Components/dxDrawer/')
44
- [DropDownBox](/api-reference/10%20UI%20Components/dxDropDownBox '/Documentation/ApiReference/UI_Components/dxDropDownBox/')
@@ -7,58 +7,46 @@ The following UI components allow you to declare their content directly in the m
77
- [Popup](/api-reference/10%20UI%20Components/dxPopup '/Documentation/ApiReference/UI_Components/dxPopup/')
88
- [Resizable](/api-reference/10%20UI%20Components/dxResizable '/Documentation/ApiReference/UI_Components/dxResizable/')
99
- [ScrollView](/api-reference/10%20UI%20Components/dxScrollView '/Documentation/ApiReference/UI_Components/dxScrollView/')
10+
- [Toast](/Documentation/ApiReference/UI_Components/dxToast/)
1011
- [Tooltip](/api-reference/10%20UI%20Components/dxTooltip '/Documentation/ApiReference/UI_Components/dxTooltip/')
1112
- [ValidationGroup](/api-reference/10%20UI%20Components/dxValidationGroup '/Documentation/ApiReference/UI_Components/dxValidationGroup/')
1213

13-
The following is an example with ScrollView:
14+
The following code snippet specifies inline ScrollView content:
1415

15-
<!-- tab: Function component -->
16-
import ScrollView from 'devextreme-react/scroll-view';
16+
<!-- tab: App.tsx -->
17+
import { ScrollView } from 'devextreme-react/scroll-view';
1718

18-
export default function App() {
19+
function App() {
1920
return (
2021
<ScrollView>
21-
<div>Some scrollable content</div>
22+
<div>ScrollView content</div>
2223
</ScrollView>
2324
);
2425
}
25-
26-
<!-- tab: Class component -->
27-
import ScrollView from 'devextreme-react/scroll-view';
2826

29-
class App extends React.Component {
30-
render() {
31-
return (
32-
<ScrollView>
33-
<div>Some scrollable content</div>
34-
</ScrollView>
35-
);
36-
}
37-
}
27+
[note]
3828

39-
[important]
29+
- To specify dynamic or conditionally rendered content, wrap this content in a static element as follows:
4030

41-
These UI components do not support dynamically or conditionally rendered content in their root element. For example, the following code **does not work**:
31+
<!-- tab: App.tsx -->
32+
<Popup ... >
33+
<div>
34+
{
35+
someCondition && <div> ... </div>
36+
}
37+
</div>
38+
</Popup>
4239

43-
<!-- tab: App.js -->
44-
<Drawer ... >
45-
{
46-
someCondition && <div> ... </div>
47-
// when the condition changes in runtime, the UI component may not render content correctly
48-
}
49-
</Drawer>
40+
Note that [Fragment](https://react.dev/reference/react/Fragment) is a dynamic element. Wrap content with tags such as `<div>` or `<span>`.
5041

51-
Wrap the content in a static element:
42+
- React mounts inline content within DevExtreme components immediately at component initialization. This behavior ignores **deferRendering** options in components that do not render content immediately:
5243

53-
<!-- tab: App.js -->
54-
<Drawer ... >
55-
<div>
56-
{
57-
someCondition && <div> ... </div>
58-
}
59-
</div>
60-
</Drawer>
44+
- DropDownBox
45+
- Popup
46+
- Popover
47+
- Toast
48+
- Tooltip
6149

62-
Note that `React.Fragment` is a dynamically rendered element and doesn't fit in this case. Use static elements such as `div` or `span` instead.
50+
This behavior initializes and renders embedded UI components at parent component initialization. To ensure embedded components are initialized and rendered only when the parent component is rendered or opened, define **contentComponent** or **contentRender**.
6351

64-
[/important]
52+
[/note]

0 commit comments

Comments
 (0)