Skip to content

Commit 85f81ab

Browse files
committed
master - 816099e76 Revert "feat(material/tabs): add the ability to keep content inside the DOM while off-screen (#20393)" (#24298)
1 parent 436cfd9 commit 85f81ab

File tree

22 files changed

+33
-237
lines changed

22 files changed

+33
-237
lines changed

docs-content/api-docs/material-tabs.html

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -953,22 +953,6 @@ <h4 id="MatTabGroup" class="docs-header-link docs-api-h4 docs-api-class-name">
953953

954954

955955

956-
<tr class="docs-api-properties-row">
957-
<td class="docs-api-properties-name-cell"><div class="docs-api-input-marker">
958-
@Input()</div><p class="docs-api-property-name">
959-
<code>preserveContent: boolean</code>
960-
</p>
961-
</td>
962-
<td class="docs-api-property-description"><p>By default tabs remove their content from the DOM while it&#39;s off-screen.
963-
Setting this to <code>true</code> will keep it in the DOM which will prevent elements
964-
like iframes and videos from reloading next time it comes back into the view.</p>
965-
</td>
966-
</tr>
967-
968-
969-
970-
971-
972956
<tr class="docs-api-properties-row">
973957
<td class="docs-api-properties-name-cell"><div class="docs-api-input-marker">
974958
@Input()</div><p class="docs-api-property-name">
@@ -1268,21 +1252,6 @@ <h4 id="MatTabsConfig" class="docs-header-link docs-api-h4 docs-api-interface-na
12681252

12691253

12701254

1271-
1272-
1273-
<tr class="docs-api-properties-row">
1274-
<td class="docs-api-properties-name-cell"><p class="docs-api-property-name">
1275-
<code>preserveContent: boolean</code>
1276-
</p>
1277-
</td>
1278-
<td class="docs-api-property-description"><p>By default tabs remove their content from the DOM while it&#39;s off-screen.
1279-
Setting this to <code>true</code> will keep it in the DOM which will prevent elements
1280-
like iframes and videos from reloading next time it comes back into the view.</p>
1281-
</td>
1282-
</tr>
1283-
1284-
1285-
12861255
</table>
12871256

12881257

docs-content/examples-highlighted/material/tabs/index-ts.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<span class="hljs-keyword">import</span> {TabGroupDynamicExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-dynamic/tab-group-dynamic-example&#x27;</span>;
1818
<span class="hljs-keyword">import</span> {TabGroupHeaderBelowExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-header-below/tab-group-header-below-example&#x27;</span>;
1919
<span class="hljs-keyword">import</span> {TabGroupLazyLoadedExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-lazy-loaded/tab-group-lazy-loaded-example&#x27;</span>;
20-
<span class="hljs-keyword">import</span> {TabGroupPreserveContentExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-preserve-content/tab-group-preserve-content-example&#x27;</span>;
2120
<span class="hljs-keyword">import</span> {TabGroupStretchedExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-stretched/tab-group-stretched-example&#x27;</span>;
2221
<span class="hljs-keyword">import</span> {TabGroupThemeExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-group-theme/tab-group-theme-example&#x27;</span>;
2322
<span class="hljs-keyword">import</span> {TabNavBarBasicExample} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./tab-nav-bar-basic/tab-nav-bar-basic-example&#x27;</span>;
@@ -38,7 +37,6 @@
3837
TabGroupThemeExample,
3938
TabNavBarBasicExample,
4039
TabNavBarWithPanelExample,
41-
TabGroupPreserveContentExample,
4240
};
4341

4442
<span class="hljs-keyword">const</span> EXAMPLES = [
@@ -56,7 +54,6 @@
5654
TabGroupThemeExample,
5755
TabNavBarBasicExample,
5856
TabNavBarWithPanelExample,
59-
TabGroupPreserveContentExample,
6057
];
6158

6259
<span class="hljs-meta">@NgModule</span>({

docs-content/examples-highlighted/material/tabs/tab-group-preserve-content/tab-group-preserve-content-example-html.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs-content/examples-highlighted/material/tabs/tab-group-preserve-content/tab-group-preserve-content-example-ts.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs-content/examples-source/material/tabs/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {TabGroupHarnessExample} from './tab-group-harness/tab-group-harness-exam
1717
import {TabGroupDynamicExample} from './tab-group-dynamic/tab-group-dynamic-example';
1818
import {TabGroupHeaderBelowExample} from './tab-group-header-below/tab-group-header-below-example';
1919
import {TabGroupLazyLoadedExample} from './tab-group-lazy-loaded/tab-group-lazy-loaded-example';
20-
import {TabGroupPreserveContentExample} from './tab-group-preserve-content/tab-group-preserve-content-example';
2120
import {TabGroupStretchedExample} from './tab-group-stretched/tab-group-stretched-example';
2221
import {TabGroupThemeExample} from './tab-group-theme/tab-group-theme-example';
2322
import {TabNavBarBasicExample} from './tab-nav-bar-basic/tab-nav-bar-basic-example';
@@ -38,7 +37,6 @@ export {
3837
TabGroupThemeExample,
3938
TabNavBarBasicExample,
4039
TabNavBarWithPanelExample,
41-
TabGroupPreserveContentExample,
4240
};
4341

4442
const EXAMPLES = [
@@ -56,7 +54,6 @@ const EXAMPLES = [
5654
TabGroupThemeExample,
5755
TabNavBarBasicExample,
5856
TabNavBarWithPanelExample,
59-
TabGroupPreserveContentExample,
6057
];
6158

6259
@NgModule({

docs-content/examples-source/material/tabs/tab-group-preserve-content/tab-group-preserve-content-example.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs-content/examples-source/material/tabs/tab-group-preserve-content/tab-group-preserve-content-example.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs-content/overviews/material/tabs/tabs.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,6 @@ <h3 id="controlling-the-tab-animation" class="docs-header-link">
9696
region="slow-animation-duration"></div>
9797

9898

99-
<h3 id="keeping-the-tab-content-inside-the-dom-while-its-off-screen" class="docs-header-link">
100-
<span header-link="keeping-the-tab-content-inside-the-dom-while-its-off-screen"></span>
101-
Keeping the tab content inside the DOM while it&#39;s off-screen
102-
</h3>
103-
<p>By default the <code>&lt;mat-tab-group&gt;</code> will remove the content of off-screen tabs from the DOM until they
104-
come into the view. This is optimal for most cases since it keeps the DOM size smaller, but it
105-
isn&#39;t great for others like when a tab has an <code>&lt;audio&gt;</code> or <code>&lt;video&gt;</code> element, because the content
106-
will be re-initialized whenever the user navigates to the tab. If you want to keep the content of
107-
off-screen tabs in the DOM, you can set the <code>preserveContent</code> input to <code>true</code>.</p>
108-
<div material-docs-example="tab-group-preserve-content"></div>
109-
110-
11199
<h3 id="accessibility" class="docs-header-link">
112100
<span header-link="accessibility"></span>
113101
Accessibility

esm2020/example-module.mjs

Lines changed: 1 addition & 17 deletions
Large diffs are not rendered by default.

esm2020/material/tabs/index.mjs

Lines changed: 4 additions & 8 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)