Browse Source

use a quite shorter, more readable and faster "template"

Dustin Utecht 6 years ago
parent
commit
ff16106b41
1 changed files with 1 additions and 9 deletions
  1. 1 9
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 1 - 9
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -40,15 +40,7 @@ const UtilsFilterControl = {
     if (
     if (
       !UtilsFilterControl.existOptionInSelectControl(selectControl, value)
       !UtilsFilterControl.existOptionInSelectControl(selectControl, value)
     ) {
     ) {
-      const option = $(
-        $('<option></option>')
-          .attr('value', value)
-          .text(
-            $('<div />')
-              .html(text)
-              .text()
-          )
-      )
+      const option = $(`<option value="${value}">${text}</option>`)
 
 
       if (value === selected) {
       if (value === selected) {
         option.attr('selected', true)
         option.attr('selected', true)