Skip to content

Debounce not working as expected (saving first value change instead of last one) #485

@Tarpsvo

Description

@Tarpsvo

I'm submitting a bug report

  • Library Version:
    1.0.0

Please tell us about your environment:

  • Operating System:
    Windows 10
  • Node Version:
    4.4.7
  • NPM Version:
    3.10.6
  • JSPM OR Webpack AND Version
    2.1.0-beta.21
  • Browser:
    Chrome
  • Language:
    ESNext

Current behavior:
The binding is as follows: if.bind="value > 0 & debounce:1000"
When value changes rapidly to 1 and then 0, and the debounce activates after 1 second, it will still use 1 as its value and the check will pass, even though value is 0.

Expected/desired behavior:
Expected result is to use the value that value is at the time of the debounce activation.

https://gist.run/?id=b0e5fd3fbaad39eb2b8b8fa6482d2589

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions