By ss_matches


2019-05-15 16:46:54 8 Comments

I am using reactive search to search against my elastic search index. I would like to have one field in the index be a default. For instance, in this app at the root level, you choose a project. When you progress farther into the app you can search. Right now, you are searching against all projects.

I have made a toggle button that I hide with css. This approach is a hack, and works until I clear all filters. That toggle button that no one sees clears the project, then I see results from all projects again.

        <ToggleButton
          style={{ display: 'none' }}
          componentId="project"
          dataField="project"
          defaultSelected={[projectId]}
          URLParams={false}
          multiSelect={false}
          showFilter={false}
          data={[
            { label: 'Project', value: projectId },
          ]}
          className="project"
        />

Is there a way to set a default search criteria?

0 comments

Related Questions

Sponsored Content

1 Answered Questions

Show just a sample of text in search results

  • 2019-05-11 17:16:07
  • user3125823
  • 26 View
  • 0 Score
  • 1 Answer
  • Tags:   reactivesearch

0 Answered Questions

Custom component in ReactiveSearch

1 Answered Questions

Reactive Search MultiDropdownList not finding dataField

0 Answered Questions

The best place to put ReactiveBase or how many can you have

  • 2018-12-12 16:15:27
  • user3125823
  • 37 View
  • 1 Score
  • 0 Answer
  • Tags:   reactivesearch

0 Answered Questions

The right way to structure ReactiveSearch components to make search work

1 Answered Questions

AppBase / Reactive search : strategy to filter from an array of ids

  • 2018-10-21 10:47:47
  • Thomas Poirier
  • 86 View
  • 0 Score
  • 1 Answer
  • Tags:   reactivesearch

1 Answered Questions

[SOLVED] Submitting a search query with ReactiveSearch

  • 2018-09-25 21:10:12
  • user3125823
  • 166 View
  • 1 Score
  • 1 Answer
  • Tags:   reactivesearch

1 Answered Questions

[SOLVED] ReactiveList related searches

  • 2018-08-18 16:23:03
  • user3125823
  • 48 View
  • 1 Score
  • 1 Answer
  • Tags:   reactivesearch

0 Answered Questions

Reactivesearch without multi search

  • 2018-08-08 12:40:57
  • Timothy Lawler
  • 70 View
  • 0 Score
  • 0 Answer
  • Tags:   reactivesearch

Sponsored Content