tabs icon indicating copy to clipboard operation
tabs copied to clipboard

Can not import "TabPane"

Open liaozhaoping opened this issue 3 years ago • 6 comments

image

liaozhaoping avatar Nov 29 '22 05:11 liaozhaoping

Same for me.

powerm1nt avatar Jan 31 '23 10:01 powerm1nt

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.

djbauch avatar Feb 21 '23 07:02 djbauch

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.

s-iliyas avatar Aug 19 '23 10:08 s-iliyas

Still nothing on this?

vrinceanuv avatar Nov 25 '23 10:11 vrinceanuv

Just downgrading it !

powerm1nt avatar Nov 26 '23 15:11 powerm1nt

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.

vrinceanuv avatar Nov 26 '23 16:11 vrinceanuv