Web Components 그리드의 행 동작

    The Ignite UI for Web Components Row Actions feature in Web Components Grid enables developers to use an IgcActionStrip and utilize CRUD for row/cell components and row pinning. There are several predefined UI controls for these operations that are applicable to a specific row in the IgcGridComponent – editing and pinning.

    Usage

    사전 정의된 작업 UI 구성 요소는 다음과 같습니다.

    이들은 기본 상호작용을 제공하기 위해IgcGridComponent 모두 추가IgcActionStrip 됩니다.

    <igc-grid row-editable="true" primary-key="ID">
        <igc-column field="field"></igc-column>
        <igc-action-strip>
            <igc-grid-pinning-actions></igc-grid-pinning-actions>
            <igc-grid-editing-actions></igc-grid-editing-actions>
        </igc-action-strip>
    </igc-grid>
    

    [!Note] When ActionStripComponent is a child component of the IgcGridComponent, hovering a row will automatically show the UI.

    Custom Implementation

    이 컴포넌트들은 템플릿을 노출하여 맞춤화에 유연성을 제공합니다. 예를 들어, 만약 우리가 다음을 사용하고자 한다면IgcActionStrip 예를 들어 행 액션이 있는 Gmail 시나리오에 적합합니다. 삭제하다, 편집하다 등등. 아이콘이 있는 버튼 컴포넌트를 만들고 클릭 이벤트를 추가한 뒤IgcActionStrip.

    <igc-grid>
        <igx-action-strip #actionstrip>
            <igx-grid-pinning-actions></igx-grid-pinning-actions>
            <button title="Edit" igxButton="icon" igxRipple (click)='startEdit(actionstrip.context)'>
                <igx-icon>edit</igx-icon>
            </button>
            <button title="Delete" igxButton="icon" igxRipple *ngIf='!isDeleted(actionstrip.context)' (click)='actionstrip.context.delete()'>
                <igx-icon>delete</igx-icon>
            </button>
        </igx-action-strip>
    </igc-grid>
    
    <igc-grid>
        <igc-action-strip #actionstrip>
            <igc-grid-pinning-actions></igc-grid-pinning-actions>
            <igc-grid-editing-actions edit-row="true" delete-row="true"></igc-grid-editing-actions>
        </igc-action-strip>
    </igc-grid>
    

    API References

    우리 커뮤니티는 활동적이며 항상 새로운 아이디어를 환영합니다.