Browse Source

nitro 6.12.0

VictoryKS 3 years ago
parent
commit
1a54f9f2c6
2 changed files with 6 additions and 2 deletions
  1. 5 1
      lib/comboSearch.ex
  2. 1 1
      mix.exs

+ 5 - 1
lib/comboSearch.ex

@@ -88,7 +88,11 @@ defmodule NITRO.Combo.Search do
           case value do
             'all' -> rows
             _ ->
-              :lists.filter(fn x -> :lists.any(&filter(value, x, &1), Keyword.get(opts, :index, [])) end, rows)
+              vals = :string.split(:string.trim(value), " ", :all)
+              if length(vals) > 1, do:
+                :lists.filter(fn x -> :lists.all(fn v ->:lists.any(&filter(v, x, &1), Keyword.get(opts, :index, [])) end, vals) end, rows),
+              else:
+                :lists.filter(fn x -> :lists.any(&filter(value, x, &1), Keyword.get(opts, :index, [])) end, rows)
           end
         newChunks = chunks + length(filtered)
         send(pid, {:direct, NITRO.comboInsert(uid: uid, dom: field, delegate: m, chunks: newChunks, feed: feed, rows: filtered)})

+ 1 - 1
mix.exs

@@ -4,7 +4,7 @@ defmodule NITRO.Mixfile do
   def project do
     [
       app: :nitro,
-      version: "6.11.11",
+      version: "6.12.0",
       description: "NITRO Nitrogen Web Framework",
       package: package(),
       deps: deps()