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

Steps are processed incorrectly when provided as array #5623

Closed
megawac opened this issue Apr 4, 2017 · 1 comment
Closed

Steps are processed incorrectly when provided as array #5623

megawac opened this issue Apr 4, 2017 · 1 comment
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@megawac
Copy link
Contributor

megawac commented Apr 4, 2017

Version

2.9.0

Environment

Ubuntu 14.04, FF 52

Reproduction link

http://codepen.io/megawac/pen/GWLJeY

Steps to reproduce

Pass Steps.Step to Steps as an array. See code below

function App() {
  let steps = [{
    title: 'Step 1',
    description: 'step 1 description'
  }, {
    title: 'Step 2',
    description: 'step 2 description'
  }, {
    title: 'Step 3',
    description: 'step 3 description'
  }];

  return (
    <div style={{margin: 100}}>
      <Steps direction="vertical" current={2}>
        {steps.map((step, index) => {
          return (
            <Steps.Step
              title={step.title}
              description={step.description}
              key={index}
            />
          );
        })}

        <Steps.Step
          title={'Complete'}
          icon="check-circle-o"
        />
      </Steps>
    </div>
  );
}

ReactDOM.render(<App />, document.getElementById('root'));

image

What is expected?

Steps are connected correctly.

What is actually happening?

When steps are provided as an array (with more than 2 steps), the step between the 2nd and the third always breaks and the final step incorrectly included a connecting line.

In the demo below I added an additional step after the array to illustrate a secondary issue. Similar issues will occur with multiple arrays or a step before the array.

@afc163 afc163 self-assigned this Apr 5, 2017
@afc163 afc163 added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Apr 5, 2017
@afc163 afc163 reopened this Apr 5, 2017
@afc163 afc163 closed this as completed in c5059e5 Apr 5, 2017
@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Apr 5, 2017
paranoidjk added a commit to ant-design/ant-design-mobile that referenced this issue Apr 8, 2017
@lock
Copy link

lock bot commented May 1, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators May 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

2 participants