nhn / tui.grid

🍞🔡 The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.42k stars 394 forks source link

Grid Type에서 dispatch함수가 포함되지 않은 이유 #1799

Open OhGyeongtaek opened 2 years ago

OhGyeongtaek commented 2 years ago

https://github.com/nhn/tui.grid/issues/1298#issue-848107542

저는 그리드안에서 데이터를 수정 했을 때 그리드의 스크롤이 맨위로 올라가서 검색을 하고 있었습니다.

검색을 하던 도중에 저와 같은 이슈가 있는 게시글을 발견했고, 아래처럼 스크롤탑 값을 변경하고 싶었는데

getGrid()에서 반환하는 Grid타입에서 dispatch 함수가 포함되어있지 않고 있어서 질문드립니다.

  1. dispatch 함수를 사용하지 않는 것을 지향하는지
  2. dispatch 대신에 사용해서 그리드의 scrollTop값을 변경할 수 있는 메서드가 있는지

Version tui-grid: "~4.21.2", typescript: "~4.7.4"

jajugoguma commented 1 year ago

Sorry for late replying.

It is not recommended to use the dispatch method because it is a method for use inside the grid and is not an interface exposed to the outside. However, currently, there is no public API to change the scrollTop of the grid, so the only way is to use it. I will consider adding an API that can change the scrollTop of the grid. thank you.