Skip to content

Rethink #66

@JakeSidSmith

Description

@JakeSidSmith

Refactor:

  • No mutation (as in Input elements lose their value while being dragged #63)
  • Remove setState where component updates are not required
  • Support immutablejs
  • No new list in callback? Provide only previous and next indices?
  • Allow defining listComponent and itemComponent (default to ul and li)
  • Allow defining listProps and itemProps which will be applied to these components
  • Allow itemKey to be a function (for getting keys from immutable objects)
  • Clone item components for rendering, or use functional components?
  • Multi-select components to reorder
/* Work in progress */

const Item = (props) => (
  <div {...props}>

  </div>
);

class App extends Component {
  render() {
    return (
      <Reorder
        listComponent="div"
        itemComponent={Item}

      />
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions