Docs: Update filter selectmenu demo

This commit is contained in:
Rob Garrison 2017-05-26 14:28:39 -05:00
parent 9772c8ae2b
commit 9a360b62a8
2 changed files with 16 additions and 5 deletions

View File

@ -29,7 +29,11 @@
$.widget( 'custom.iconselectmenu', $.ui.selectmenu, {
_renderItem: function( ul, item ) {
var hasClass,
li = $( '<li>', { text: item.label } );
li = $( '<li>' ),
wrapper = $( "<div>", {
// empty strings don't work, pass a &nbsp;
text: item.label || '\xA0'
});
if ( item.disabled ) {
li.addClass( 'ui-state-disabled' );
}
@ -38,8 +42,8 @@
style : item.element.attr( 'data-style' ),
'class' : hasClass ? 'ui-icon ' + item.element.attr( 'data-class' ) : ''
})
.appendTo( li );
return li.appendTo( ul );
.appendTo( wrapper );
return li.append( wrapper ).appendTo( ul );
}
});
@ -98,6 +102,13 @@
<em>NOTE!</em>
</p>
<ul>
<li>Updated <span class="version">v2.28.12</span>:
<ul>
<li>Fix issue with the selectmenu rendering with jQuery UI v1.12.1.</li>
<li>Fixed a filter widget issue with regular expression settings being ignored since select filters are set to exactly match the content (modified in <span class="version">v2.25.4</span>)</li>
<li><span class="label warning">*NOTE*</span> "filter-match" *must* be added to header since the default select behavior is to exactly match settings and this demo uses a combination of select value using partial matches and regular expressions.</li>
</ul>
</li>
<li>Demo added <span class="version">v2.24.4</span>, to demonstrate how to use <a href="http://jqueryui.com/selectmenu/#custom_render">jQuery UI Selectmenu widget</a> on a filter row select.</li>
<li><span class="label warning">*NOTE*</span> - Selectmenu will not work properly in all circumstances:
<ul>
@ -113,7 +124,7 @@
<table id="table" class="tablesorter">
<thead>
<tr>
<th class="filter-select">File Name</th>
<th class="filter-select filter-match">File Name</th>
<th>Updated</th>
</tr>
</thead>

View File

@ -477,7 +477,7 @@
<li>formatter: <a href="example-widget-filter-formatter-1.html">jQuery UI widgets</a> and <a href="example-widget-filter-formatter-2.html">HTML5 Elements</a> (v2.7.7; <span class="version updated">v2.17.5</span>).</li>
<li>formatter: <a href="example-widget-filter-formatter-select2.html">select2 v3</a> (<span class="version">v2.16.0</span>; <span class="version updated">v2.26.6</span>).</li>
<li>formatter: select2 v4 (TO DO)</li>
<li><a href="example-widget-filter-selectmenu.html">Using jQuery UI Selectmenu</a> (<span class="version">v2.24.4</span>).</li>
<li><a href="example-widget-filter-selectmenu.html">Using jQuery UI Selectmenu</a> (<span class="version">v2.24.4</span>; <span class="version updated">v2.28.12</span>).</li>
</ul>
</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-formatter.html">Formatter widget</a> (<span class="version">v2.19.1</span>).</li>