Skip to content

feat: add relation lookup column type#2271

Open
Koc wants to merge 2 commits into
mainfrom
feature/add-lookup-column-type
Open

feat: add relation lookup column type#2271
Koc wants to merge 2 commits into
mainfrom
feature/add-lookup-column-type

Conversation

@Koc

@Koc Koc commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

This is continuation of #2248 that allows to display more column from relation table.
There are 2 tables: employees and vacations. We can add vacation.requester relation column that referenced to the row id of the employee and display employee.name. But what if we need to display more column from the related table? e.g. employee.department. That's where relation lookup can help: select already existent relation and choose what extra column should be displayed.

🖼️ Screenshots

image

image

🗒️ TODO

@Koc Koc changed the title Feature/add lookup column type feat: add lookup column type Jan 19, 2026
@Koc
Koc changed the base branch from main to feature/add-relations-column-type January 19, 2026 16:47
@Koc
Koc force-pushed the feature/add-lookup-column-type branch 3 times, most recently from abbdf56 to 30a0005 Compare January 19, 2026 17:46
@Koc Koc mentioned this pull request Jan 20, 2026
2 tasks
@Koc Koc added the enhancement New feature or request label Jan 21, 2026
@Koc
Koc force-pushed the feature/add-relations-column-type branch 2 times, most recently from f34f8f9 to d406233 Compare January 25, 2026 12:47
@Koc
Koc force-pushed the feature/add-relations-column-type branch 5 times, most recently from 502b69b to 8093d63 Compare February 15, 2026 16:40
@Koc
Koc force-pushed the feature/add-relations-column-type branch 7 times, most recently from d45b95c to cb637bd Compare February 28, 2026 18:32
@enjeck
enjeck force-pushed the feature/add-relations-column-type branch from cb637bd to 9b36f43 Compare March 4, 2026 04:59
@Koc
Koc force-pushed the feature/add-relations-column-type branch 3 times, most recently from b47617a to 3240639 Compare March 25, 2026 23:07
@enjeck
enjeck force-pushed the feature/add-relations-column-type branch from 3240639 to 0cdfefa Compare April 23, 2026 03:47
@Koc
Koc force-pushed the feature/add-relations-column-type branch 3 times, most recently from b707106 to f3c29d8 Compare May 4, 2026 21:45
@Koc
Koc force-pushed the feature/add-relations-column-type branch from f3c29d8 to b426237 Compare May 7, 2026 14:05
@Koc
Koc marked this pull request as ready for review July 12, 2026 00:31
@Koc
Koc requested a review from enjeck as a code owner July 12, 2026 00:31
@Koc
Koc force-pushed the feature/add-lookup-column-type branch from 87248d9 to fd0695d Compare July 12, 2026 00:31
@Koc
Koc requested review from blizzz and enjeck as code owners July 12, 2026 00:31
@Koc
Koc force-pushed the feature/add-lookup-column-type branch 9 times, most recently from a94d637 to ac1036d Compare July 15, 2026 22:58
@Koc Koc changed the title feat: add lookup column type feat: add relation lookup column type Jul 19, 2026
@Koc Koc mentioned this pull request Jul 19, 2026

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even with the screenshots, I'm not sure what we're adding and what the usecase is?

@Koc

Koc commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@enjeck I've updated description:

There are 2 tables: employees and vacations. We can add vacation.requester relation column that referenced to employee.name. But what if we need to display more column from the related table? e.g. employee.department. That's where relation lookup can help: select already existent relation and choose what extra column should be displayed.

Comment thread src/modules/modals/CreateRow.vue Outdated
Comment on lines +66 to +71
if (column.type === ColumnTypes.RelationLookup) {
rowData[column.title] = this.getRelationLookupValue(column, row, dataStore)
} else {
const set = row.data ? row.data.find(d => d.columnId === column.id) || '' : null
rowData[column.title] = set ? column.getValueString(set) : ''
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to omit if/else and move functionality to the column class

@Koc
Koc force-pushed the feature/add-lookup-column-type branch 3 times, most recently from 8865ddc to e3d186a Compare July 25, 2026 13:22
Koc added 2 commits July 25, 2026 15:43
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc
Koc force-pushed the feature/add-lookup-column-type branch from e3d186a to dd0bdd6 Compare July 25, 2026 13:43
@Koc

Koc commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

added Behat tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants