Closed
Description
Hi,
I discovered a bug running the example in examples/elasticsearch
I have successfully started a local elasticsearch, added the data, and started both server and app with npm start
Steps to repro:
in a first tab localhost:3000
do:
- Search for 'mountain'
- Search for 'basin'
in a second tab localhost:3000
do:
- Search for 'basin'
You will see that the first tab has, incorrectly, the following as the first result as a residual of the first search 'mountain':
description Covering most of Mount Desert Island and other coastal islands, Acadia features the tallest mountain on the Atlantic coast of the United States, granite peaks, ocean shoreline, woodlands, and lakes.
id park_acadia
title Acadia
nps_link https://www.nps.gov/acad/index.htm
The second tab displays the correct results:
Great Basin
description Based around Nevada's second tallest mountain, Wheeler Peak, Great Basin National Park contains 5,000-year-old bristlecone pines, a rock glacier, and the limestone Lehman Caves.
id park_great-basin
title Great Basin
nps_link https://www.nps.gov/grba/index.htm
Further Info:
Dependencies
{
"@elastic/react-search-ui": "1.5.1",
"@elastic/react-search-ui-views": "1.5.1",
"@elastic/search-ui": "1.5.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-scripts": "3.0.1"
}
Versions
MacOSX: 11.3.1 (20E241)
❯ node -v
v14.17.0
❯ npm -v
7.14.0
Other discoveries
- Same issue occurs using my own onSearch function. That was actually how I discovered this bug
- Issue happens on both Chrome and Safari
- Issue does not occur in
examples/sandbox