react-component / react-component/tabs

设置 inkBar 为 false 无法隐藏 inkBar

Open
#605 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
572
Forks
241
Avg merge
4d 18h
Merged PRs (30d)
4

Description

新版的 rc-tabs 没有找到相关的使用文档,从源码的 .d.ts 文件来看,tabs 组件可以接受 animated prop,设置 inkBar 为 false 后应该可以隐藏 inkBar,但实际上设置后无效

import React from "react";
import "rc-tabs/assets/index.css";
import RcTabs from "rc-tabs";

const items = [
  {
    key: 1,
    label: "first",
    children: "content 1",
  },
  {
    key: 2,
    label: "second",
    children: "content 2",
  },
  {
    key: 3,
    label: "third",
    children: "content 3",
  }
]

export default function App() {
  return (
    <RcTabs
      items={items}
      animated={
        {
          inkBar: false
        }  
      }
    />
  );
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the animated prop declaration in the .d.ts file and trace its implementation in rc-tabs, reproducing the provided React example with animated.inkBar set to false. Done means the inkBar is hidden as expected and the supported behavior is covered by an appropriate test or documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.