feat: add query parameters management#198
feat: add query parameters management#198followynne merged 14 commits intoserilog-contrib:masterfrom
Conversation
Co-authored-by: mo-esmp <[email protected]>
Co-authored-by: mo-esmp <[email protected]>
Co-authored-by: mo-esmp <[email protected]>
Co-authored-by: mo-esmp <[email protected]>
|
Hi @mo-esmp @sommmen I'll tag you as soon as I put out the beta v, to let you provide a feedback on the result :) |
Looks great - im not on .net 10 yet so idk if i can get to testing soonish but ill see. Then just before load is called we call 'updateRequestOptions' - it updates the requestoptions (intemediate field -> req. options) it then passes this to apiservice.getCollection(opt); which flows to the backend. Then the query params get updated also. that way the request to the api is always reflected in the url instead of the frontend state. The solution as-is also works fine ofcourse. |
|
@sommmen I think I get your point, in this case I choose to plug this behavior in the client side infrastructure, we can later review it for improvement :) BTW, the new version will be published for NET8&10, I'm just removing NET6 support to follow NET release cycle. |
The changes I made were (#192):
instead of simple query-string parse/set, I changed the flow the application uses to manage the search state:
when a value changes, the URL is updated and the app reflects it in its internal state (and viceversa)
source of truth becomes the URL
URL updates and is included in the browser history (moving back and forth the browser history is reflected in the parameters and in the application)
I added a table-key set on query completion (it should fix #195!)