allofphysicsgraph / dynamic-search

search a graph using a webform
GNU General Public License v3.0
0 stars 1 forks source link

pure javascript regex search for use on derivationmap.net #1

Open bhpayne opened 4 years ago

bhpayne commented 4 years ago

On the page https://derivationmap.net/list_all_expressions there is currently a search capability for plain text. When a match is found, the table rows are displayed. The results are dynamic (on keypress).

The source code for the feature on that page is https://github.com/allofphysicsgraph/proofofconcept/blob/gh-pages/v7_pickle_web_interface/flask/templates/list_all_expressions.html#L5

The search.py capablity of regex could be translated to javascript in order to be used to search table rows.

Alternatively, a working jQuery-based example could be converted to pure Javascript.

bhpayne commented 4 years ago

I don't see any search-related capability listed on either https://plainjs.com/javascript/plugins/navigation/ or https://plainjs.com/javascript/plugins/inputs/

bhpayne commented 4 years ago

There is a jQuery-based implementation, https://datatables.net/ with a demo of regex table search here https://www.ihbc.org.uk/consultationsdb_new/examples/api/regex.html

My goal is to minimize dependencies, so this isn't a solution for derivationmap.net

bhpayne commented 4 years ago

relies on jQuery. Has the capability (I think) but I'm not able to get the examples working

https://stackoverflow.com/questions/9127498/how-to-perform-a-real-time-search-and-filter-on-a-html-table