Skip to content

Commit

Permalink
fixed #406: muted clear
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
	_docs/CHANGELOG.md
	lib/compressed/picker.js
  • Loading branch information
amsul committed Dec 6, 2014
1 parent 2b751c3 commit f338db7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/compressed/picker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) {
/**
* Clear the values
*/
clear: function() {
return P.set( 'clear' )
clear: function( options ) {
return P.set( 'clear', null, options )
}, //clear


Expand Down
15 changes: 15 additions & 0 deletions tests/units/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,21 @@ test( 'As muted methods', 1, function() {
picker.set({ select: new Date() }, { muted: true })
})

test( 'Clear as muted', function() {

var picker = this.picker
var called = false

// Bind the callback.
picker.on('set', function() {
called = true
})

picker.clear({ muted: true })

ok( !called, 'Callback not called' )
})

test( 'Open with alternate focus', function() {

var picker = this.picker,
Expand Down

0 comments on commit f338db7

Please sign in to comment.