dexie/Dexie.js

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

开放

#1,528 创建于 2022年3月31日

 (6 条评论) (0 个反应) (0 位负责人)JavaScript (625 个派生)batch import
contribution wantedgood first issue

仓库指标

星标
 (10,304 个星标)
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()
      ))

贡献者指南