Open willmcgugan opened 2 months ago
Yes this is very useful. Also some screenshots with visual examples will be great.
Could I suggest that something more simple and more generic be considered?
A watcher on input should be able to fire on one of two conditions: any change (key press, paste, cut) or any completion (blur or enter). A watcher should be able to be boolean (just disallow the changes) or return a pair with (optional new value, optional new renderable instead of just rendering the value). This allows for suggesters, regex validation, type ahead, complex highlighting like different parts of a url, complex validation like being sure the part number is in stock, and pretty much every use case.
A Suggester just becomes one of the watchers.
Could you share a quick code snippet of what that might look like in a new discussion @merriam? I'm struggling to visualize it.
The Input widget docs don't cover Suggesters, other than a reference in the API. It is such a useful feature I think it deserves a section with a simple demo.