ed-roh/fullstack-admin

Transaction Page

Opened this issue · 1 comments

In the Data-grid pages are not changing #15 i tried changing the version didn't work

For anyone who comes across this in the future, the problem lies in the getTransactions function in the client controller. The total transactions returned is zero (0) which affects rowCount prop on the Data grid component on the frontend.
use this:
const total = await Transaction.countDocuments();

instead of this:
const total = await Transaction.countDocuments({ name: { $regex: search, $options: "i" }, });