New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(failed) attempt to make the results remain until a new search is run #440
Conversation
@@ -27,6 +27,8 @@ final class SearchPage extends Component | |||
|
|||
private ?LengthAwarePaginator $results = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@faustbrian This property cannot be made public (and hence have LiveWire rehydrate it on each request, at the cost of a larger payload off course). So we have no other option than to run the search again. Which I think it's a waste of time, given we still expect the user to enter other details in other fields before the search makes sense.
@@ -23,15 +23,15 @@ | |||
|
|||
@if($results && $results->count()) | |||
<div> | |||
@if ($state['type'] === 'block') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an attempt to re-render not based on current selection (which is being updated), but on latest search results. Of course it doesn't work, because $results
didn't keep state.
Summary
Checklist