diff --git a/DetailsList/DetailsList/index.ts b/DetailsList/DetailsList/index.ts index 91347fee..f1bec015 100644 --- a/DetailsList/DetailsList/index.ts +++ b/DetailsList/DetailsList/index.ts @@ -351,7 +351,16 @@ export class FluentDetailsList implements ComponentFramework.ReactControl 0 ? ids[0] : null; + // Set the eventRowKey using the RecordKey of the first selected record + const firstSelectedId = ids.length > 0 ? ids[0] : null; + if (firstSelectedId) { + const firstRecord = this.records[firstSelectedId]; + if (firstRecord) { + this.eventRowKey = firstRecord.getValue(RecordsColumns.RecordKey)?.toString() || firstSelectedId; + } + } else { + this.eventRowKey = null; + } this.notifyOutputChanged(); } };