Release v2.11.1
This commit is contained in:
@@ -129,6 +129,26 @@
|
||||
|
||||
input.value = String(currentUrl.searchParams.get(searchParam) || '').trim();
|
||||
|
||||
var searchGroup = input.closest('.table-search-group');
|
||||
if (searchGroup) {
|
||||
var actionButton = searchGroup.parentNode ? searchGroup.parentNode.querySelector('.btn:not(.table-search-group .btn)') : null;
|
||||
if (actionButton && actionButton.getBoundingClientRect) {
|
||||
searchGroup.style.setProperty('--table-search-action-offset', (actionButton.getBoundingClientRect().width + 8) + 'px');
|
||||
}
|
||||
var searchToggle = searchGroup.querySelector('[data-table-search-toggle]');
|
||||
if (searchToggle) {
|
||||
searchToggle.addEventListener('click', function () {
|
||||
focusSearchInput(input);
|
||||
});
|
||||
searchToggle.addEventListener('keydown', function (event) {
|
||||
if (event.key === 'Enter' || event.key === ' ') {
|
||||
event.preventDefault();
|
||||
focusSearchInput(input);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updateSearch() {
|
||||
var query = String(input.value || '').trim();
|
||||
var nextUrl = new URL(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user