Skip to content

‘distinct’ can't work as the description in tutorials  #3069

@liuyunwei

Description

@liuyunwei

the test code in http://reactivex.io/rxjs/manual/tutorial.html#producing-values

// typing "hello world"
var input = Rx.Observable.fromEvent(document.querySelector('input'), 'input');
// Only pass unique values through
input.pluck('target', 'value').distinct()
  .subscribe(value => console.log(value)); // "helo wrd"

When I type "hello world", it prints "hello world", is there anything wrong?

RxJS version:
5.0.3
Code to reproduce:
copy the demo codes to make a online demo
http://reactivex.io/rxjs/manual/tutorial.html#producing-values
http://jsbin.com/kiwumisoja/edit?html,js,console,output
Expected behavior:
http://reactivex.io/rxjs/manual/tutorial.html#producing-values
print "helo wrd" in console tab
Actual behavior:
print "hello world"
Additional information:

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