alleyinteractive / alleyinteractive/alley-scripts

Last search request to return displays in post selector

Aperta
#428 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug Post Selector
Lingua principale
TypeScript
Stelle
10
Fork
3
Merge medio
4g 22h
PR unite (30g)
2

Descrizione

### Description of the bug

Somewhat related to #152: If the post selector makes multiple requests to the search endpoint, the last of those requests to return will be the one whose results are displayed, even if it wasn't the last request that was actually sent for the current search term.

### Steps To Reproduce

Add this snippet somewhere:

```
if ( 'par' === ( $_GET['search'] ?? '' ) ) {
sleep( 5 );
}
```

Open the post selector and the Network tab of your browser tools. Search for `park` in the post selector (or use a different word that works better with your test data). You should see search requests for `par` and `park`.

The request for `park` will return first and populate the selector results. The request for `par` returns second, and the results for that search will replace the results that were there for `park`.

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.