mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Fixed products page product group filter to use an exact search instead of contains (fixes #2570)
This commit is contained in:
@@ -27,10 +27,13 @@ $("#product-group-filter").on("change", function()
|
||||
var value = $("#product-group-filter option:selected").text();
|
||||
if (value === __t("All"))
|
||||
{
|
||||
value = "";
|
||||
productsTable.column(productsTable.colReorder.transpose(6)).search("").draw();
|
||||
}
|
||||
else
|
||||
{
|
||||
productsTable.column(productsTable.colReorder.transpose(6)).search("^" + value + "\$", true, false).draw();
|
||||
}
|
||||
|
||||
productsTable.column(productsTable.colReorder.transpose(6)).search(value).draw();
|
||||
});
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
|
Reference in New Issue
Block a user