dexie/Dexie.js

How to use liveQuery() in Vue with reactive query paramters

Open

#1,528 建立於 2022年3月31日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)JavaScript (625 fork)batch import
contribution wantedgood first issue

倉庫指標

Star
 (10,304 star)
PR 合併指標
 (平均合併 2天 5小時) (30 天內合併 3 個 PR)

描述

I want to implement a pagination, Did Vue have reactive query variable like React hooks useLiveQuery() second parameter deps?

const limit = ref(50);
const items = useObservable(liveQuery(
        () =>
         db.orderBy("creat")
            .limit(limit.value)  // the limit is reavtive ref, but change limit not triger the items change.
            .toArray()
      ))

貢獻者指南