Hi, I have been testing forest admin for a while and decided to use it with a a postgres datasource.
I createad a sql view in my database and use the docs to integrate that view in my admin manage sql views.
Then i did some testing and I’m getting results in my forest admin UI. The problem is that in the UI when doing some searchs or applying some filters to my data, I get duplicated rows, but the UI is receiving the correct data (saw the request response in chrome network tab) . I will add some images to make myself clear.
In the above screenshot we can see that forest admin is showing 2 records but the second row is a duplicated row of the first one, In the network manager we can see the result of the request, inside data, 2 records are returned but this 2 records are different one with balance 1.42 and the other one with balance 995, which is the correct behavior. Seems to me that forest admin for some reason is rendering n times (based on response length ) only the second record. Also when accessing the record I get thee content of the first record in data, the one with 1.42 not the selected one of 995.
Here is a screenshot of the request headers page
Show in the admin the rows returned by forest admin server
Only 1 row is rendered, and the other ones are duplicated of the first one (number of duplicate is based on the length of the response data array)
When quering the view this is the query that is being run in the server forest admin
Executing (default): SELECT count(*) AS “count” FROM “public”.“user_budgets” AS “user_budgets” WHERE (lower(“user_budgets”.“name”) LIKE lower(’%email@example.com%’) OR lower(“user_budgets”.“email”) LIKE lower(’%firstname.lastname@example.org%’) OR lower(“user_budgets”.“type”) LIKE lower(’%email@example.com%’) OR lower(“user_budgets”.“group_name”) LIKE lower(’%firstname.lastname@example.org%’) OR lower(“user_budgets”.“currency”) LIKE lower(’%email@example.com%’));
The request to the server admin is
Please include any relevant log snippets, if necessary.
I follow the docker installation steps, so my app is run inside a container, but I’m able to do CRUD operation with my data inside the forest admin UI
- Package Version: forest-express-sequelize 7.11.2
- Express Version: 4.17.1
- Sequelize Version: 5.22.0
- Database Dialect: postgresql
- Database Version: 9.6
- Project Name: Sunlight-prod