Skip to content

typeahead's async :data-source is racey #361

@p-himik

Description

@p-himik

Consider this :data-source:

(fn [s callback]
  (go
    (<! (timeout (* 1000 (- 3 (count s)))))
    (callback (suggestions-for-search s)))
  nil)

Now when you start typing, type goo but slowly - 250-500 ms between key strokes.

You'll see the suggestions first opening for goo, then for go, then for g, even though the text input still contains goo.

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