Ant Design Tabs: hide more element

Viewed 18

I need left tabs with two items with component Tabs (ant.design).
This component shows me "more element" and I don't now how hide it.
enter image description here

My code:

...
const tabItems = [
    {label:'Tab 1',key:'1',children:'Content of Tab 1'},
    {label:'Tab 2',key:'2',children:'Content of Tab 2'},
]
...
return (
    ...
    <Tabs
        tabPosition="left"
        items={tabItems}
    />
    ...
)

When I use three or more items - it's works fine:
enter image description here

--- updated ---
I found crutch solution.
Add to component styles:

.ant-tabs-nav-operations {
    display: none !important;
}
1 Answers

Can you confirm your render isn't wrong? If not, here's an updated code and it works like it should

const {  Tabs  } = antd;


const onChange = (key) => {
  console.log(key);
};
const tabItems = [
    {label:'Tab 1',key:'1',children:'Content of Tab 1'},
    {label:'Tab 2',key:'2',children:'Content of Tab 2'},
]

const App = () => (
  <Tabs
tabPosition={'left'}
    items={tabItems}
  />
);

const ComponentDemo = App;


ReactDOM.render(<ComponentDemo />, mountNode);

screenshot of the antd tab component

Related