瀏覽代碼

Fix client choice loader

Guillermo Espinoza 8 年之前
父節點
當前提交
1c50e96e43
共有 1 個文件被更改,包括 4 次插入7 次删除
  1. 4 7
      Form/ChoiceList/Loader/ClientChoiceLoader.php

+ 4 - 7
Form/ChoiceList/Loader/ClientChoiceLoader.php

@@ -137,6 +137,10 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
 
     /**
      * Get first n choices
+     * 
+     * @param string $filter
+     * 
+     * @return array
      */
     public function getChoicesList($filter)
     {
@@ -153,14 +157,7 @@ class ClientChoiceLoader implements ChoiceLoaderInterface
         $filter_len = mb_strlen($filter);
 
         foreach ($choices as $label => $id) {
-            if ($filter_len > 0) {
-                if (mb_substr(mb_strtolower($label), 0, $filter_len) !== $filter) {
-                    continue;
-                }
-            }
-
             $result[$label] = $id;
-
             if (++$cnt >= $limit) {
                 break;
             }