kiriDevs / vplanweb

A web app for the substitution plan of my school - data is supplied by an API maintained by @ChuangSheep
https://vplan.kiridevs.live
3 stars 0 forks source link

Going into settings resets the `Date` input field #29

Open kiriDevs opened 2 years ago

kiriDevs commented 2 years ago

Very minor, but kinda bugs me. Can probably be implemented with the same structure changes required for a better version of title:

Saving more than just the Substitutions in state - also save the date. That would allow the app to both replace the document.title with a string including the date and also to re-set the date input field to the date of the last request made. However, this would not help if no request was made before going into settings. That case needs further investigation.

kiriDevs commented 2 years ago

Also resets the already requested entries - it basically just wipes the HomeScreens state. Maybe investigate if there's a way to prevent that, otherwise just maintain that data somehow.

kiriDevs commented 2 years ago

This can be fixed using the <Offscreen /> component queued for release in React 18. Since this is not that urgent, I think we should just wait until that's done and then use it.

kiriDevs commented 2 years ago

Well, it isn't an input field anymore (dropdown) and the actual problem about this is that it re-fetches everything (after #69 is merged), but I'll keep this open for now since the point of the issue still applies.