U4-5267 - v7: Backoffice search-as-you-type should be throttled

Created by Asbjørn Riis-Knudsen 23 Jul 2014, 07:44:53 Updated by Shannon Deminick 11 Dec 2014, 05:18:07

Relates to: U4-5977

Relates to: U4-5994

Relates to: U4-3872

The search-as-you-type feature in v7 is great, but it has an annoying flaw: it is not throttled. It searches immediately every time a key is pressed.

When typing even moderately fast, this causes problems, as you type faster than the searches can complete - especially given that a search for one or two letters will usually take a bit longer, as more results are returned.

Thus, when searching for "test", when I finish typing, I will first get the results for "test". Then, it will append search results for "t" and perhaps "te" to the result list ''after'' I have finished typing. This should not happen.

Instead, searching should be throttled, so that a search request is only sent to the server after a short delay of 1-200 ms, so as to ensure that the user has (temporarily) finished typing. This will also reduce server load.

In AngularJS 1.3, this would be the perfect solution: https://docs.angularjs.org/api/ng/directive/ngModelOptions But as Umbraco 7.1 only uses AngularJS 1.1 as far as I can tell, we'll probably need something less elegant...

Comments

Per Ploug 13 Aug 2014, 09:25:44

Search uses _.debounce so it is throttled, increased the timer from 100ms to 300ms tho


Priority: Normal

Type: Bug

State: Fixed

Assignee: Per Ploug

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0, 7.1.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5

Due in version: 7.1.5

Sprint:

Story Points:

Cycle: