feat: add relation lookup column type - #2271
Conversation
abbdf56 to
30a0005
Compare
f34f8f9 to
d406233
Compare
502b69b to
8093d63
Compare
d45b95c to
cb637bd
Compare
cb637bd to
9b36f43
Compare
b47617a to
3240639
Compare
3240639 to
0cdfefa
Compare
b707106 to
f3c29d8
Compare
f3c29d8 to
b426237
Compare
a94d637 to
ac1036d
Compare
enjeck
left a comment
There was a problem hiding this comment.
Even with the screenshots, I'm not sure what we're adding and what the usecase is?
|
@enjeck I've updated description:
|
| 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) : '' | ||
| } |
There was a problem hiding this comment.
try to omit if/else and move functionality to the column class
e3d186a to
dd0bdd6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
dd0bdd6 to
af54364
Compare
Having a relation column, and a lookup column is extremely confusing. Even with this, I had to think extra hard to understand how they're different. If I'm struggling to understand as the dev, I doubts users will easily get it (or maybe it's just me, lol). I would need others to check if they understand this just from the description and images. Maybe @nextcloud/designers need to weigh in |
|
well, that's pretty similar to Excel's |
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
4362724 to
9667d06
Compare
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
9667d06 to
e7ff045
Compare
| - SPDX-License-Identifier: AGPL-3.0-or-later | ||
| --> | ||
| <template> | ||
| <component :is="cellComponent" |
There was a problem hiding this comment.
replaced with a simple function
|
I certainly think the names should be changed at least. @marcoambrosini, ideas? Let's also just say that Excel's ancient statistics-oriented DSL is maybe not the best language to draw inspiration from when it comes to design ;) |
|
the "Lookup" term is used for this in both Baserow and Airtable. For the relational ones they use the wording "Link to table". I would do the same Maybe this can help: https://baserow.io/user-docs/lookup-field |
This is continuation of #2248 that allows to display more column from relation table.
There are 2 tables:
employeesandvacations. We can addvacation.requesterrelation column that referenced to the row id of theemployeeand displayemployee.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
🗒️ TODO
getTableCellComponenthelper for better reusability #2763 first