React Grid 열 이동 개요
Ignite UI for React 열을 이동할 수 있는 기능을 지원하여 표시되는 열 순서에 따라 열을 표시할 방법을 유연하게 결정할 수 있습니다.
React Grid Column Moving Example
Column moving in the Ignite UI for React Data Grid is on by default, and can be controlled by setting the columnMovingMode property of the grid. This property has two options, Deferred or None. Deferred will allow column moving, while None will disable column moving for the entire grid.
When column moving is set to Deferred, a separator will show up while moving a column. While moving a column, once the mouse pointer is released, the moved column will take the place of the column placed to the right of the separator. This separator can also be customized in width and color by using the columnMovingSeparatorWidth and columnMovingSeparatorBackground properties, respectively.
원한다면 열의 움직임을 애니메이션으로 만들 수도 있습니다. 이는 그리드의 속성을 설정columnMovingAnimationMode 함으로써 할 수 있습니다. 애니메이션은 기본적으로 켜져 있지 않습니다.
Code Snippet
다음은 지연된 열 이동, 활성화된 애니메이션 및 5px 너비의 구분 기호를 사용하여 Ignite UI for React에서 열 이동을 구현하는 방법을 보여줍니다.
import { ColumnMovingAnimationMode } from 'igniteui-react-data-grids';
import { ColumnMovingMode } from 'igniteui-react-data-grids';
<IgrDataGrid
ref={this.onGridRef}
height="500px"
width="100%"
dataSource={this.data}
columnMovingMode={ColumnMovingMode.Deferred}
columnMovingAnimationMode={ColumnMovingAnimationMode.SlideOver}
columnMovingSeparatorWidth={5} />