mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-15 03:36:33 +03:00
Automatically set table filter option to 'equals' if its not set
This commit is contained in:
parent
3b3d739e91
commit
a6eade1ae1
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
||||
<option value="null">IS NULL</option>
|
||||
<option value="not_null">NOT NULL</option>
|
||||
</select>
|
||||
<input type="text" class="form-control" placeholder="Search query" />
|
||||
<input type="text" class="form-control" placeholder="Filter value" id="table_filter_value" />
|
||||
<button class="btn btn-primary btn-sm apply-filters" type="submit">Apply</button>
|
||||
<button class="btn btn-default btn-sm reset-filters"><i class="fa fa-times"></i></button>
|
||||
</form>
|
||||
|
@ -1093,6 +1093,14 @@ $(document).ready(function() {
|
||||
showTableContent();
|
||||
});
|
||||
|
||||
// Automatically prefill the filter if it's not set yet
|
||||
$("select.column").on("change", function() {
|
||||
if ($("select.filter").val() == "") {
|
||||
$("select.filter").val("equal");
|
||||
$("#table_filter_value").focus();
|
||||
}
|
||||
});
|
||||
|
||||
$("#pagination .next-page").on("click", function() {
|
||||
var current = $(".current-page").data("page");
|
||||
var total = $(".current-page").data("pages");
|
||||
|
Loading…
Reference in New Issue
Block a user