Refactor field definition and column definition manipulation with record field (#13992)

This PR introduces the usage of record fields in the manipulation of
table columns and board fields.

Since all of the actual system relies on states like tableColumns,
recordIndexFieldDefinitions and the likes, it was required to implement
temporary utils that modifies those states in parallel of the new
generic currentRecordFields, to keep a working product.

With this PR though, currentRecordFields becomes the single source of
truth that gets saved to DB, and the remaining work is just to make the
switch with this new state on all components that are plugged to
tableColumns and the like.

This will be done in another PR.
This commit is contained in:
Lucas Bordeau
2025-08-20 12:03:12 +02:00
committed by GitHub
parent 3f6866da20
commit 00478152e0
31 changed files with 867 additions and 459 deletions
@@ -0,0 +1,5 @@
export const findById = <T extends { id: string }>(idToMatch: string) => {
return (itemToFind: T) => {
return itemToFind.id === idToMatch
}
}
@@ -0,0 +1,5 @@
export const findByProperty = <T, K extends keyof T>(property: K, valueToMatch: T[K]) => {
return (itemToFind: T) => {
return itemToFind[property] === valueToMatch
}
}