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

Grid Horizontal Scroll Fails When Vertical and Horizontal Scrollbars Are Present #2060

Open
lsy7851 opened this issue Aug 28, 2024 · 1 comment
Labels

Comments

@lsy7851
Copy link

lsy7851 commented Aug 28, 2024

Describe the bug
When both vertical and horizontal scrolls are present, the horizontal scroll does not function correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Create a grid instance that has both vertical and horizontal scrolls.
  2. Scroll while holding down the Shift key.
  3. The grid scrolls vertically as if the Shift key was not pressed.
  4. The vertical scrolling stops, and then the horizontal scrolling begins.

This is an example code where an error occurs.

const data = () => {
  const data = [];
  for (let i = 0; i < 100; i += 1) {
    data.push({
      column1: `column1 - ${i}`,
      column2: `column2 - ${i}`,
      column3: `column3 - ${i}`,
      column4: `column4 - ${i}`,
      column5: `column5 - ${i}`,
      column6: `column6 - ${i}`,
    });
  }
  return data;
};

new Grid({
  el: document.getElementById('grid'),
  columns: [
    {
      name: 'column1',
      width: 1000,
    },
    {
      name: 'column2',
      width: 1000,
    },
    {
      name: 'column3',
      width: 1000,
    },
    {
      name: 'column4',
      width: 1000,
    },
    {
      name: 'column5',
      width: 1000,
    },
    {
      name: 'column6',
      width: 1000,
    },
  ],
  bodyHeight: 200,
  data: data(),
});

Expected behavior
When scrolling with the Shift key pressed, only horizontal scrolling should occur, and vertical scrolling should remain unchanged.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 127.0.6533.122

Additional context
This bug occurs in tui.grid version 4.21.22. It worked correctly in tui.grid version 4.21.0.


Describe the bug
수직, 수평 스크롤이 모두 있을 경우 수평 스크롤이 올바르게 동작하지 않습니다.

To Reproduce
Steps to reproduce the behavior:

  1. 수직과 수평 스크롤이 모두 생기도록 그리드 인스턴스를 생성합니다.
  2. shift 키를 누른 채 스크롤 합니다.
  3. 쉬프트 키를 누르지 않은 것처럼 수직 스크롤 됩니다.
  4. 수직 스크롤이 끝나고 수평 스크롤이 시작됩니다.

에러가 발생한 예제 코드는 상단 영문 설명을 참고해 주세요.

Expected behavior
shift 키를 누른 채 스크롤 하면 수직 스크롤 은 그대로 두고 수평 스크롤만 작동해야 합니다.

Desktop (please complete the following information):

  • OS: window 10
  • Browser: chrome
  • Version 127.0.6533.122

Additional context
tui.grid 4.21.22 에서 버그 발생합니다.
tui.grid 4.21.0 버전에서 정상 작동을 확인했습니다.

@lsy7851 lsy7851 added the Bug label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@lsy7851 and others