budibase
budibase copied to clipboard
Table using an external database with a formula column as the primaryDisplay show it on the far right instead of respecting the order of the dataview.
Checklist
- [X] I have searched budibase discussions and github issues to check if my issue already exists
Hosting
- Self
- Method: docker compose
- Budibase Version: 2.27.5
- App Version: 2.27.5
Describe the bug
This issue only appears if the table component is linked to a dataprovider
as its source. If you directly reference the table the order will be correctly reflected.
To Reproduce Steps to reproduce the behavior:
- Import app attached below.
- Use the table create script attached below to create the database.
- Fetch the tables in Budibase
- Add a formula column, doesn't matter what its called.
- Set the formula column to be the primaryDisplay column.
- Create a new screen that has a dataprovider linked to the newly created table.
- Add a table component nested inside the data provider, make sure the table is using the data provider as the source of its info.
- See the error, if the formula is the primary display it will go to the far right of the screen instead of being the first column.
Expected behavior primaryDisplay should always be the first column shown in the table.
Screenshots
App Export formula-column-primary-display.enc.tar.gz
CREATE TABLE "public"."users" (
"id" varchar(10) NOT NULL DEFAULT ('us-'::text || lpad((nextval('user_id_seq'::regclass))::text, 5, '0'::text)),
"name" varchar(100),
"created_at" timestamp DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);