위치:
기부 항목 그리드에서 사용자 지정 Lightning 웹 구성 요소
사용자 지정 Lightning 웹 구성 요소가 기프트 항목 그리드에서 데이터를 이동하는 방법을 이해합니다.
| 필수 Edition |
|---|
| 지원 제품: Lightning Experience |
지원 제품: Education Cloud를 사용하는 Enterprise, Performance, Unlimited 및 Developer Edition 지원 제품: Nonprofit Cloud를 사용하는 Enterprise, Unlimited 및 Developer Edition |
- Gift 항목 그리드에서 구성 요소에 전송되는 속성
Gift Entry Grid는 cell 구성 요소의 params 속성과 modals의 rowData 속성을 통해 행 데이터를 사용자 정의 Lightning 웹 구성 요소로 전달합니다. - Gift 항목 그리드에 데이터 다시 보내기
열 모달 및 셀 편집 구성 요소는 다양한 메커니즘을 사용하여 기프트 항목 그리드에 데이터를 반환합니다. - 데이터 반환에 대한 고려 사항
데이터를 기프트 항목 표로 되돌릴 때 선택 목록 및 조회 필드에 대한 다음 규칙을 고려하십시오.
Gift 항목 그리드에서 구성 요소에 전송되는 속성
Gift Entry Grid는 cell 구성 요소의 params 속성과 modals의 rowData 속성을 통해 행 데이터를 사용자 정의 Lightning 웹 구성 요소로 전달합니다.
| 필수 Edition |
|---|
| 지원 제품: Lightning Experience |
지원 제품: Education Cloud를 사용하는 Enterprise, Performance, Unlimited 및 Developer Edition 지원 제품: Nonprofit Cloud를 사용하는 Enterprise, Unlimited 및 Developer Edition |
| 속성 | 설명 |
|---|---|
| params |
|
| rowData |
|
Gift 항목 그리드에 데이터 다시 보내기
열 모달 및 셀 편집 구성 요소는 다양한 메커니즘을 사용하여 기프트 항목 그리드에 데이터를 반환합니다.
| 필수 Edition |
|---|
| 지원 제품: Lightning Experience |
지원 제품: Education Cloud를 사용하는 Enterprise, Performance, Unlimited 및 Developer Edition 지원 제품: Nonprofit Cloud를 사용하는 Enterprise, Unlimited 및 Developer Edition |
열 모달
열 모달은 모달 제목(템플릿에 정의된 대로)과 계속 및 취소 버튼을 포함하는 래퍼 Lightning 웹 구성 요소 내에서 렌더링됩니다.
계속 버튼은 사용자가 사용자 정의 모달을 닫기 위해 클릭하는 버튼입니다. 다음의 필수 노출 함수를 호출합니다.
| 함수 | 설명 |
|---|---|
@api validate() |
두 가지 속성이 있는 개체를 반환합니다.
|
@api getComponentValues() |
행에 적용할 속성의 key:value 집합을 반환합니다.
|
셀 편집 구성 요소
셀 편집 구성 요소에서 기프트 항목 그리드에 데이터를 다시 반환하려면 다음을 수행합니다.
- 개체를 기프트 항목 그리드로 돌아가기 위한 메시지로 구성합니다.
lightning__giftEntryGridComponentAction메시지 채널에 이벤트를 게시합니다.
메시지 본문의 내용은 엄격합니다. 이 예제의 구조를 따르십시오.
// Build the "message" object to send back to
// Gift Entry Grid following the documented contract
const message = {
// Required properties (do not change the values below)
action: "ColumnEdit",
componentName: this.tagName,
colId: this._params?.colDef?.colId,
// 'details' is an optional property:
// - include if there is data to write to the row
// in Gift Entry
details: {
// rowId and rowIndex must be included in details
rowId: this.params?.data?.id, // Required
rowIndex: this.params?.data?.rowIndex, // Required
// All GiftEntry fields to write to rowData
// and as object in a key:value collection.
// To clear the value of a field on the GiftEntry rowData
// object, return null instead of undefined
giftEntryFields : { key: value, ... },
// rowProperties is optional, but if passed can be
// referenced by other custom components. Data in this
// object are not persisted to the GiftEntry record.
rowProperties: { key : value, ... },
// Special Use: If your custom column component is
// forcing a matched gift transaction, use these
// properties to send the matching transaction ID
// and NAME back to grid for proper handling:
matchingGiftTransactionId: {giftTransactionId},
matchingGiftTransactionName: {giftTransactionName}
}
}
데이터 반환에 대한 고려 사항
데이터를 기프트 항목 표로 되돌릴 때 선택 목록 및 조회 필드에 대한 다음 규칙을 고려하십시오.
| 필수 Edition |
|---|
| 지원 제품: Lightning Experience |
지원 제품: Education Cloud를 사용하는 Enterprise, Performance, Unlimited 및 Developer Edition 지원 제품: Nonprofit Cloud를 사용하는 Enterprise, Unlimited 및 Developer Edition |
선택 목록 필드 고려 사항:
- 선택 목록 필드가 단순 문자열로 반환되는 경우 값은 레이블과 API 이름이 서로 다른 경우 선택 목록 API 이름을 나타내야 합니다.
- 선택 목록 필드는
{ value: xx, displayValue: zz }형태의 객체로 반환할 수도 있습니다. 예는 다음과 같습니다.{ giftType: { value: “Organizational”, displayValue: “Organizativo/Doméstico” } }
조회 필드 고려 사항:
- 기프트 항목 그리드의 열이 아닌 조회 필드는 응답 개체에서만 ID 문자열로만 반환할 수 있습니다. 예:
{MyLookupFieldId__c: ‘xxx00000000’} - 선물 항목 그리드의 필드 열인 조회 필드(예: 캠페인 및 아웃리치 소스 코드)는 개체 형식으로 사용자 정의 Lightning 웹 구성 요소에서 반환되어 그리드에서 올바르게 렌더링됩니다. 예제는 다음과 같습니다.
Campaign: { Id: {campaignId}, Name: {campaignName} }

