Skip to content

refDebounced doesn't work with objects #3158

@HugeLetters

Description

@HugeLetters

Describe the bug

debTest gets updated immediately instead of after a 1000ms delay.

const test = ref({ value: 'TEST' });
const debTest = refDebounced(test, 1000, { maxWait: 2000 });

Doing this works but is quite wordy with bigger objects.

const test = ref({ value: 'TEST' });
const debTest = refDebounced(
	computed(() => ({ value: test.value.value })),
	1000,
	{ maxWait: 2000 }
);

Reproduction

examples provided above

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics
    Memory: 2.19 GB / 15.33 GB
  Binaries:
    Node: 20.1.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1702.0), Chromium (114.0.1823.43)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @vueuse/core: ^10.1.2 => 10.1.2
    @vueuse/nuxt: ^10.1.2 => 10.1.2
    vue: ^3.3.2 => 3.3.4

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy