Semantic-Org / UI-Search

A search element allows a user to query for results from a selection of data

Home Page:http://semantic-ui.com/modules/search.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

programmatically modify search query

weiss-uni-lib-trier opened this issue · comments

Dear developers,

let me introduce our project first: We are building a web search engine for a printed lexicon which has been digitalized.

For the search input we are providing search suggestions via the Semantic-UI search module.

We would like to provide functionality described by the following use case:

  1. When the user clicks on a suggestion, the suggestion shall be surrounded with "-Signs.
  2. The resulting quoted suggestion shall be placed into the corresponding input field.
  3. If the user enters another string before or after the string, which is quoted, the suggestion list shall only show suggestions for the unquoted part of the input.
  4. If the user clicks on another suggestion from the second suggestion list, the new suggestion shall be surrounded by ".
  5. The second quoted suggestion, which was selected by the user, shall replace all unquoted parts.

For our use case it is necessary, that the search query can be modified and afterwards be processed as if that modified query would have been the original query. Is this behaviour realisable yet?

I think you want to leverage Behaviours as found here:

https://semantic-ui.com/modules/search.html#/usage

See specifically, 'get query' and 'query' and 'search local' those might be useful.