echosen

Hello,

I’d like to know how to display the ‘X’ in the dropdown to clear the field?

I saw the http://harvesthq.github.com/chosen/ that you can set the attribute ‘allow_single_deselect: true’ but can not reproduce in the extension.

in the attached image is an example.

2412

imagem.png

Thanks

In what way does this relate to a Yii extension?

Or Yii in general?

has an extension that uses this component: http://www.yiiframework.com/extension/echosen

Thanks for the link - and the clarification. :)

anyone??

I’ve also been looking for the solution to the allow_single_deselect problem. This might help. :)

To display the ‘X’ in the drop down, use


'class' => 'chzn-select-deselect'

(instead of


'class' => 'chzn-select'

), and add the following JavaScript:


$(".chzn-select-deselect").chosen({allow_single_deselect:true});

.