Protofy-xyz / Protofy

AI Supercharged LowCode Platform CMS and Framework 🚀🚀
https://protofy.xyz/
MIT License
237 stars 50 forks source link

DataView does not load data initially in 'grid' defaultView #63

Closed jjjorgina closed 7 months ago

jjjorgina commented 9 months ago

Expected Behavior

In the DataView component, when the defaultView prop is set to 'grid', the information should load properly without any manual intervention.

Current Behavior

However, when the defaultView is set to 'grid', the information fails to load initially, leaving the card empty. The data only appears after changing the view to list or raw and then returning to the grid view.

Steps to Reproduce

  1. Set the defaultView prop of the DataView component to 'grid'.
  2. Navigate to the page where the defaultView is configured.
  3. Observe that the information does not load initially.
  4. Change the view to list or raw.
  5. Switch back to the grid view.
  6. Notice that the information now appears as expected.

Context (Environment)

Issue demo

https://github.com/Protofy-xyz/Protofy/assets/111370411/81e3ccf0-a063-41aa-b428-2701d428cf2c

gdomenech98 commented 7 months ago

This wrong behaviour is fixed (as shown in video). I've added defaultView prop to 'grid' at 'Protofy/protolib/bundles/pages/adminPages.tsx' https://github.com/Protofy-xyz/Protofy/assets/108338080/6dd64b74-73c4-4050-bbad-9779cd761d51