<div dir="ltr"><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:23.2727279663086px">Ur/Web's home page states that it "supports construction of dynamic web applications backed by SQL databases".</span><br></font></div><div><span style="color:rgb(51,51,51);line-height:23.2727279663086px"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><font face="arial, helvetica, sans-serif"><span style="color:rgb(51,51,51);line-height:23.2727279663086px">However, more than 5 years after its release, Ur/Web still lacks one of the most essential components for developing database applications: a data-bound</span><font color="#333333"><span style="line-height:23.2727279663086px"> type-ahead / auto-complete widget supporting easy editing of foreign-key fields.</span></font></font></div><div><font color="#333333" face="arial, helvetica, sans-serif"><span style="line-height:23.2727279663086px"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><font color="#333333"><span style="line-height:23.2727279663086px">In the interest of raising awareness and encouraging collaboration on this issue, I've put up a github repo of a small Ur/Web database project I'm working on. As the ReadMe points out, this project is (and will unfortunately forever remain) largely unusable until someone figures out how to </span></font><span style="color:rgb(51,51,51);line-height:23.2727279663086px">add a data-bound</span><font color="#333333"><span style="line-height:23.2727279663086px"> type-ahead / auto-complete widget to allow users to conveniently edit the foreign-key fields.</span></font></font></div><div><font color="#333333" face="arial, helvetica, sans-serif"><span style="line-height:23.2727279663086px"><br></span></font></div><div><font color="#333333" face="arial, helvetica, sans-serif"><span style="line-height:23.2727279663086px"><a href="https://github.com/StefanScott/urweb-crudcrud/">https://github.com/StefanScott/urweb-crudcrud/</a><br></span></font></div><div><font color="#333333" face="arial, helvetica, sans-serif"><span style="line-height:23.2727279663086px"><br></span></font></div><div><font color="#333333" face="arial, helvetica, sans-serif"><span style="line-height:23.2727279663086px">But this isn't just a problem for this particular Ur/Web database app - this is a problem for *all* Ur/Web database apps - </span></font><span style="color:rgb(51,51,51);font-family:arial,helvetica,sans-serif;line-height:23.2727279663086px">because, as we know, most databases use an auto-increment integer "surrogate" primary key column (eg: <a href="http://customer.id">customer.id</a>), while the user thinks and works in terms of another (generally also unique) "human-readable" column or set of columns (eg: <a href="http://customer.name">customer.name</a>, or customer.first_name + customer.last_name).</span></div><div><font color="#333333" face="arial, helvetica, sans-serif"><div style=""><span style="line-height:23.2727279663086px"><br></span></div><div style=""><span style="line-height:23.2727279663086px">Probably no modern real-world database app in existence would expect the user to select a parent record by (memorizing and) manually typing an integer foreign key into a plain text field (eg: invoice.customer_id) - this would be totally crazy! </span><span style="line-height:23.2727279663086px">But unfortunately, this is how all published Ur/Web database examples do it. How can such a powerful web database framework be lacking such an essential UI widget - over five years after release?</span></div><div style=""><span style="line-height:23.2727279663086px"><br></span></div><div style=""><span style="line-height:23.2727279663086px">Of course, the right way to let the user select a foreign key is the way nearly all other modern database apps do it: via some sort of menu or "pick list" - nowadays often implemented in the browser as a "</span><span style="line-height:23.2727279663086px">type-ahead" or "auto-complete" input field.</span></div><div style=""><span style="line-height:23.2727279663086px"><br></span></div><div style=""><span style="line-height:23.2727279663086px">Without a data-bound type-ahead / auto-complete widget for editing foreign-key fields, it is unlikely that Ur/Web will ever see much adoption </span><span style="line-height:23.2727279663086px">among database application developers. As back-end developers, they would of course be perfectly capable of *using* a data-bound type-ahead / auto-complete widget for their foreign-key fields - most of them (including me :-) probably would not have the front-end development skills needed to *create* this kind of widget on their own for Ur/Web.</span></div><div style=""><span style="line-height:23.2727279663086px"><br></span></div><div style=""><span style="line-height:23.2727279663086px">So I'm wondering if there might be anyone out there who might be willing and able to create </span><span style="line-height:23.2727279663086px">a data-bound type-ahead / auto-complete widget for Ur/Web? This would be a great contribution to help make Ur/Web usable by other database application developers out there!</span></div><div style=""><br></div><div style=""><span style="line-height:23.2727279663086px">At the link below are three Issues I've also posted on the github repo, showing:</span></div><div style=""><span style="line-height:23.2727279663086px">(a) </span><span style="line-height:23.2727279663086px">some results and discussions </span><span style="line-height:23.2727279663086px">on my initial (so far unsuccessful) attempts to use Ur/Web FFI to wrap an existing JavaScript library such as Select2 or Twitter typeahead.js; and </span></div></font><font color="#333333" face="arial, helvetica, sans-serif"><div style=""><span style="line-height:23.2727279663086px">(b) some questions regarding whether / how this could be done "natively" in Ur/Web.</span></div><div style=""><span style="line-height:23.2727279663086px"><a href="https://github.com/StefanScott/urweb-crudcrud/issues">https://github.com/StefanScott/urweb-crudcrud/issues</a><br></span></div><div style="">(See the first three issues posted)</div><div style=""><br></div><div style="">Thanks for any ideas or help!</div><div style=""><br></div><div style=""><span style="line-height:23.2727279663086px"><br></span></div><div style=""><span style="line-height:23.2727279663086px"><br></span></div></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-size:12.8000001907349px"><br></div></div>