Unplanned
Last Updated: 26 Sep 2024 13:19 by Patrik
Eric
Created on: 28 Feb 2020 19:00
Category: Grid
Type: Feature Request
29
enter should execute the filter in the filter menu

Hi - this one is a feature request, not a bug. :)

 

For the filter menu, when you enter a filter value, it would be nice if you could press enter to execute the filter instead of having to click "Filter."

 

10 comments
Patrik
Posted on: 26 Sep 2024 13:19

Nice workaround! 

I've done similair workarounds in the past. In a future release, Telerik might change a name of a css class or some other selector which might make this kind of workaround stop working. Just a heads up...

ADMIN
Hristian Stefanov
Posted on: 26 Sep 2024 13:10

Hi René,

Sharing your workaround here, publicly so other developers facing the scenario can benefit from it is highly appreciated.

Thank you.

Regards,
Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

René
Posted on: 25 Sep 2024 13:44
Since this is still unplanned I created a workaround for myself that might be useful for the community.

I added this to my site.js:

function addKeyDownHandlerForTelerikFilterMenu() {
document.body.addEventListener("keydown", function (event) {
if (event.key === "Enter") {
if (event.target.classList.contains("k-input-inner") && event.target.closest(".k-filter-menu-container")) {
const filterMenuContainer = event.target.closest(".k-filter-menu-container");
const filterButton = filterMenuContainer.querySelector(".k-button-solid-primary");
if (filterButton) {
filterButton.click();
}
}
}
if (event.key === "Delete") {
if (event.target.closest(".k-filter-menu-container")) {
const filterMenuContainer = event.target.closest(".k-filter-menu-container");
const clearButton = filterMenuContainer.querySelector('button[type="reset"]');
if (clearButton) {
clearButton.click();
}
}
}
});
}

And in my MainLayout.razor I added this:
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JsRuntime.InvokeVoidAsync("addKeyDownHandlerForTelerikFilterMenu");
}

await base.OnAfterRenderAsync(firstRender);
}

Now I can confirm any input in a textfield of the filtermenu with ENTER and this will perform a click on the Filter-Button.
If the focus is set to a FilterMenu and I hit the DEL-Key, a click on the Clear-Button is performed.


ADMIN
Hristian Stefanov
Posted on: 26 Jul 2024 13:11

Hi Dave,

I can confirm that the item is still unplanned. Until next month at least, our backlog/short-term planning is filled with items of more priority and demand.

When we transfer the task to our short-term backlog, the status will be updated to "Planned" along with an associated release month.

Regards,
Hristian Stefanov
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

David
Posted on: 24 Jul 2024 15:44

Hello,

Is there any update on this request? I have customers openly complaining that this feature does not exist. I may have to consider other options that support this feature.

 

Regards,

Dave

René
Posted on: 28 Oct 2022 15:03

Please raise the priority for this.  Whenever I watch users utilizing the filters they almost always hit Enter before clicking on the filter button (with a sigh).

Regards,
René

Aleksandr
Posted on: 07 Apr 2022 13:45
it would be great to have this option, some of our clients asking for it 
ADMIN
Marin Bratanov
Posted on: 21 Oct 2020 08:08

Hi Andrew,

The best way to get updates is to click the Follow button on the page. When something happens (such as the release being known), you will receive an email update.

For the time being I can only suggest you consider a custom filter template where you can implement the desired logic (which is not trivial).

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Andrew
Posted on: 20 Oct 2020 19:39
any update on this or is there another option as a work around
ADMIN
Marin Bratanov
Posted on: 02 Mar 2020 08:29

Hello Eric,

I moved this to the feature requests in the feedback portal: https://feedback.telerik.com/blazor/1455841-enter-to-execute-filter so you can Follow it.

At the moment, you can use the Tab key to go through the elements in the filter menu and when the Filter button is focused, Enter will click it to execute the filter. You can find more details on the supported keyboard actions in the grid in the following demo: https://demos.telerik.com/blazor-ui/grid/keyboard-navigation

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor