Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not import "TabPane" #617

Open
liaozhaoping opened this issue Nov 29, 2022 · 6 comments
Open

Can not import "TabPane" #617

liaozhaoping opened this issue Nov 29, 2022 · 6 comments

Comments

@liaozhaoping
Copy link

image

@Powerm1nt
Copy link

Same for me.

@djbauch
Copy link

djbauch commented Feb 21, 2023

I was able to get this to work in my code with version 12.5.6 by coding:
import Tabs from 'rc-tabs';
import TabPane from 'rc-tabs/es/TabPanelList/TabPane';
TabPane is not re-exported from the package at the top level. Things must have been different in earlier releases.

That's not helping when it's being used by a dependency rather than by my own code. For example, the npmjs react-widgets package is code that doesn't want to work with the current version. react-widgets hasn't been updated in a year.

@s-iliyas
Copy link
Contributor

import Tabs from 'rc-tabs';

var callback = function(key) {
console.log(key);
};

const z = [
  {
    key: "1",
    label: "Google",
    children: (
      <div className="text-xl">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting</p>
      </div>
    ),
  },
  {
    key: "2",
    label: <p>Amazon</p>,
    children:
      "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...",
    disabled: true
  },
  {
    key: "3",
    label: <p>Twitter</p>,
    children: (
      <div>
        "There is no one who loves pain itself, who seeks after it and wants to
        have it, simply because it is pain..."
      </div>
    ),
  },
];

React.render(
    <Tabs
      tabPosition="bottom"
      items={z}
      defaultActiveKey="1"
      className="md:w-[70%] w-full mx-auto p-2 border-0"
      onChange={callback}
      style={{color:"yellow"}}
    />
);

I have opened a pr with updated Read-Me file, tabpane is removed from import in newer versions.

@vrinceanuv
Copy link

Still nothing on this?

@Powerm1nt
Copy link

Just downgrading it !

@vrinceanuv
Copy link

vrinceanuv commented Nov 26, 2023

Just downgrading it !

already done that, but wanted to use the latest version, as I like to keep the packages I use up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants