diff --git a/CHANGELOG.md b/CHANGELOG.md index d67715f..3f4ef7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.2.0 + +### Feature: KyteTable column projection (KYTE-#190) + +`KyteTable` now sends an `x-kyte-fields` header listing the columns it displays, so a list read returns only those columns instead of every column (large `TEXT`/`BLOB` columns stay out of list payloads). The value is the same field list the table already builds from its `columnDefs` (dotted FK paths like `client.name` included) — a distinct header from `x-kyte-page-search-fields` because search ("which columns to match") and projection ("which columns to return") are different concerns. Requires kyte-php ≥ 4.16 (the server maps dotted FK paths to their base column and always adds `id` + FK ids back, so row actions and FK labels keep working). Fully backward compatible: an older server ignores the header. + ## 2.1.0 ### Feature: anonymous fall-through for JWT-mode public access (KYTE-#229) diff --git a/kyte-source.js b/kyte-source.js index 0af6579..e5e7151 100644 --- a/kyte-source.js +++ b/kyte-source.js @@ -1501,6 +1501,13 @@ class KyteTable { headers.push({'name':'x-kyte-page-idx','value': this.currentPage}); headers.push({'name':'x-kyte-page-search-value','value': this.searchValue ? btoa(encodeURIComponent(this.searchValue)) : ""}); headers.push({'name':'x-kyte-page-search-fields','value': fields.join(',')}); + // Column projection (KYTE-#190): tell the server to return only the + // fields this table actually displays (dotted FK paths like + // `client.name` included — the server maps them to their base column). + // Same value as search-fields but a distinct header: search = which + // columns to match; projection = which columns to return. The server + // always adds id + FK ids back, so row actions and FK labels still work. + headers.push({'name':'x-kyte-fields','value': fields.join(',')}); if (this.sortColumn) { headers.push({'name':'x-kyte-page-order-col','value': this.sortColumn});