crate / crate-admin

The admin user interface for CrateDB.
Apache License 2.0
26 stars 19 forks source link

Incorrect object data on specific record on second page of results #817

Open hlcianfagna opened 1 year ago

hlcianfagna commented 1 year ago

Logging this as an AdminUI issue as it is not reproducible with crash

CrateDB version

5.4.0

Steps to Reproduce

CREATE TABLE adminuiissue (o OBJECT,descr TEXT);
INSERT INTO adminuiissue(o,descr) SELECT {},'This is another one' FROM generate_series(1,17);
INSERT INTO adminuiissue(o,descr) SELECT {},'Something else' FROM generate_series(1,81);
INSERT INTO adminuiissue(o,descr) SELECT '{"tschritter":{},"code":"abcde1","tz":"Europe","shifts":[],"assignees":{},"language":"de","id":123,"plant_key":"abcde1","stations":{}}','Look at this record';
-- From the AdminUI
SELECT * FROM adminuiissue ORDER BY descr ASC;
-- Expand the o object for "Look at this record", note there is data in there
SELECT * FROM adminuiissue ORDER BY descr DESC;
-- Go to the bottom of the second page of results 
-- expand the o object for "Look at this record"
-- note there is NO data in there
surister commented 8 months ago

Confirmed, once the data paginates (+50 records), any object that is not on the first page doesn't show the data

surister commented 7 months ago

If we just put the data on screen, it is there:

Image

but for some reason <formatted-object object="column.value" expand="false"></formatted-object> does not get the value when paginated, it never makes it to the scope:

Image

surister commented 7 months ago

Banging my head over this wall once again, same results, for some reason the data exists in the loop that creates the elements, but it never makes it to the element's scope. It is like if you call a function with a parameter, the parameter exists before calling the function, but then inside the function scope there parameter is None, makes no sense, no idea why angularjs is doing this dark magic.

I tried to test old versions, I managed to build until 231b8631e5773f75fd6ee36b56df9a075c3296a1 (1.19.0 - 07/13/21) and the issue still persists, cannot build older since npm/node will just blow up.