• ui-select : There is no "X"(delete button) with selectize theme, when allow-clear="true"


    but add allow-clear="true"
    For Bootstrap and Select2 themes, it's working perfectly.

    reason:

    It looks like the icon/button is not present on the selectize template. 

    before:

    <ui-select ng-model="rfilter.value" name="{{rfilter.id}}" required ng-style="{'minWidth': '80px'}" theme="selectize">
                            <ui-select-match allow-clear="true" placeholder="{{rfilter.name}}">
                                {{$select.selected.name}}
                                <!--<a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="Select box clear" style="padding-right: 0;" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right">-->
                                    <!--<i class="glyphicon glyphicon-remove" aria-hidden="true" style="top: 2px;"></i>-->
                                <!--</a>-->
                            </ui-select-match>
                            <ui-select-choices repeat="vvalue as vvalue in rfilter.valid_values | filter: { name: $select.search }">
                                <div ng-bind-html="vvalue.name | highlight: $select.search"></div>
                            </ui-select-choices>
                        </ui-select>

    Workaround:

    <ui-select ng-model="rfilter.value" name="{{rfilter.id}}" required ng-style="{'minWidth': '80px'}" theme="selectize">
                            <ui-select-match allow-clear="true" placeholder="{{rfilter.name}}">
                                {{$select.selected.name}}
                                <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="Select box clear" style="padding-right: 0;" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right">
                                    <i class="glyphicon glyphicon-remove" aria-hidden="true" style="top: 2px;"></i>
                                </a>
                            </ui-select-match>
                            <ui-select-choices repeat="vvalue as vvalue in rfilter.valid_values | filter: { name: $select.search }">
                                <div ng-bind-html="vvalue.name | highlight: $select.search"></div>
                            </ui-select-choices>
                        </ui-select>
  • 相关阅读:
    WPF程序内存泄漏问题文章推荐
    UAC影响读写文件和注册表
    .NET COM Interop 中的ReleaseComObject使用准则
    读Excel数据并导入到数据库中最快的方法
    DEP问题文章推荐
    深入了解GC文章推荐
    IIS 发布网站
    iis5.1安装方法(适用于XP),IIS5.0安装包下载、IIS5.1安装包下载、IIS6.0安装包下载
    单击GridView的某一行 根据此行id得到这行的所有信息
    asp.net背景图片自动适应屏幕大小
  • 原文地址:https://www.cnblogs.com/Sisiflying/p/6802836.html
Copyright © 2020-2023  润新知