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

Left/right movement not working #7

Open
acchaulk opened this issue Oct 7, 2020 · 2 comments
Open

Left/right movement not working #7

acchaulk opened this issue Oct 7, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@acchaulk
Copy link

acchaulk commented Oct 7, 2020

Does this library support left/right movement? I'm trying to modify the example tests to move a task to the right to the "in progress" column. Here's an example

test('moves a task right inside a column', async () => {
      const { getByText, getByTestId, makeGetDragEl } = renderApp();

      await makeDnd({
        getByText,
        getDragEl: makeGetDragEl('Cook dinner'),
        direction: DND_DIRECTION_RIGHT,
        positions: 1,
      });

      const { getAllByTestId: getAllByTestIdWithinColumn } = within(
        getByTestId('in-progress-column'),
      );
      const testTextOrderByTestId = createTestTextOrderByTestIdHelper(
        getAllByTestIdWithinColumn,
      );
      testTextOrderByTestId('task-content', [
        'Cook dinner',
      ]);
    });
@colinrobertbrooks
Copy link
Owner

From the README:

Currently supports moving a <Draggable /> n positions up or down inside a <Droppable />.

PRs welcome.

@acchaulk
Copy link
Author

acchaulk commented Oct 9, 2020

Missed that originally. I do believe that it works, the only problem that I'm seeing is the You have moved the item screen reader statement isn't reached. Locally, if I comment that line it seems to work and the element is added to the right droppable (if moving right)

@colinrobertbrooks colinrobertbrooks added enhancement New feature or request help wanted Extra attention is needed labels Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants