From b049ec69eb0cd82ceab361e572e91e48ace5a539 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Mon, 22 Apr 2024 15:15:53 +0300 Subject: [PATCH 1/2] Fix#6443 --- components/doc/tabview/scrollabledoc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/doc/tabview/scrollabledoc.js b/components/doc/tabview/scrollabledoc.js index 29c499575c..6c43105b8d 100644 --- a/components/doc/tabview/scrollabledoc.js +++ b/components/doc/tabview/scrollabledoc.js @@ -21,7 +21,7 @@ import React, { useState } from 'react'; import { TabView, TabPanel } from 'primereact/tabview'; export default function ScrollableDemo() { - const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) + const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) return (
@@ -43,8 +43,8 @@ import React, { useState } from 'react'; import { TabView, TabPanel } from 'primereact/tabview'; export default function ScrollableDemo() { - const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) - + const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) + return (
From 790deedbec3c659933a495858fde0f2a74c28178 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo Date: Mon, 22 Apr 2024 15:58:26 +0300 Subject: [PATCH 2/2] Fix#6443 sync with vue --- components/doc/tabview/scrollabledoc.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/doc/tabview/scrollabledoc.js b/components/doc/tabview/scrollabledoc.js index 6c43105b8d..450f4e5499 100644 --- a/components/doc/tabview/scrollabledoc.js +++ b/components/doc/tabview/scrollabledoc.js @@ -3,11 +3,11 @@ import { DocSectionText } from '@/components/doc/common/docsectiontext'; import { TabPanel, TabView } from '@/components/lib/tabview/TabView'; export function ScrollableDoc(props) { - const tabs = Array.from({ length: 50 }, (_, i) => ({ title: `Tab ${i + 1}`, content: `Tab ${i + 1} Content` })); + const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: `Tab ${i + 1}`, content: `Tab ${i + 1} Content` })); const code = { basic: ` - {tabs.map((tab) => { + {scrollableTabs.map((tab) => { return (

{tab.content}

@@ -21,12 +21,12 @@ import React, { useState } from 'react'; import { TabView, TabPanel } from 'primereact/tabview'; export default function ScrollableDemo() { - const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) + const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) return (
- {tabs.map((tab) => { + {scrollableTabs.map((tab) => { return (

{tab.content}

@@ -43,12 +43,12 @@ import React, { useState } from 'react'; import { TabView, TabPanel } from 'primereact/tabview'; export default function ScrollableDemo() { - const tabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) + const scrollableTabs = Array.from({ length: 50 }, (_, i) => ({ title: \`Tab \${i + 1}\`, content: \`Tab \${i + 1} Content\` })) return (
- {tabs.map((tab) => { + {scrollableTabs.map((tab) => { return (

{tab.content}

@@ -71,7 +71,7 @@ export default function ScrollableDemo() {
- {tabs.map((tab) => { + {scrollableTabs.map((tab) => { return (

{tab.content}