processwire / processwire-issues

ProcessWire issue reports.
44 stars 2 forks source link

InputfieldPageAutocomplete limit not being used (video provided) #1902

Closed jlahijani closed 3 months ago

jlahijani commented 3 months ago

If you set a limit on an InputfieldPageAutocomplete field, it will not be used.

Tested on PW 3.0.236.

Video (2m41sec): https://www.youtube.com/watch?v=vBe5A4Y6vVs

ryancramerdesign commented 3 months ago

Thanks @jlahijani I've pushed a fix for that. Note however that autocomplete really needs a low limit value to be effective. That's because it may get called several times as you type, and if there's a limit 5000 and you start typing "com..." for company, then it'll start finding pages using all 2400+ words that start with "com" such as companies, compost, computer, complicated, communist, coma, and on and on... which might just kill the autocomplete or make it spend 60+ seconds trying to find up to 5000 pages for something you typed awhile ago. So I'd aim to keep your limit under 100, or just let it use its default limit for the best performance.