@ni/nimble-components 18.6.1 → 18.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5500,7 +5500,8 @@ this.updateTableOptions({data:e,getRowId:i})}refreshRows(){const t=this.table.ge
|
|
|
5500
5500
|
this.tableData=t.map((t=>({record:t.original,id:t.id}))),this.virtualizer.dataChanged()}updateTableOptions(t){this.options={...this.options,...t,state:{...this.options.state,...t.state}},this.table.setOptions(this.options),this.refreshRows()}setSortState(){const t=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.sortIndex-e.sortIndex))
|
|
5501
5501
|
this.firstSortedColumn=t.length?t[0]:void 0
|
|
5502
5502
|
const e=t.map((t=>({id:t.internalUniqueId,desc:t.sortDirection===rb.descending})))
|
|
5503
|
-
this.updateTableOptions({state:{sorting:e}})}generateTanStackColumns(){const t=this.columns.map((t=>({id:t.internalUniqueId,
|
|
5503
|
+
this.updateTableOptions({state:{sorting:e}})}generateTanStackColumns(){const t=this.columns.map((t=>({id:t.internalUniqueId,accessorFn:e=>{const i=t.operandDataRecordFieldName
|
|
5504
|
+
if("string"==typeof i)return e[i]},sortingFn:Tb(t.sortOperation)})))
|
|
5504
5505
|
this.updateTableOptions({data:[...this.table.options.data],columns:t})}}t([nt({attribute:"id-field-name"})],Db.prototype,"idFieldName",void 0),t([f],Db.prototype,"tableData",void 0),t([f],Db.prototype,"columns",void 0),t([f],Db.prototype,"childItems",void 0),t([f],Db.prototype,"actionMenuSlots",void 0),t([f],Db.prototype,"openActionMenuRecordId",void 0),t([f],Db.prototype,"canRenderRows",void 0),t([f],Db.prototype,"firstSortedColumn",void 0)
|
|
5505
5506
|
const zb=Db.compose({baseName:"table",template:kb,styles:hb})
|
|
5506
5507
|
no.getOrCreate().withPrefix("nimble").register(zb()),no.tagFor(Db)
|