In the first commit, reapplies the class -> function component refactor that was already deployed earlier (but buggy)
In the second commit, fixes the bug where DropdownContent was expecting a prop with a different name
In the third commit, fixes another regression caused by the refactor that is currently happening on prod - the refactor started cancelling API requests on the initial render, which was not the case before with componentDidMount. I've introduced a custom hook that's basically a useEffect but does not run on the initial render.
This prop name mismatch was responsible for two wrong behaviours:
1) Filter button always displaying this (even without any applied filters):
2) When "+ Add filter" was clicked, displaying this on safari for a second or so:
Changes
Preview: https://pr-4213.review.plausible.io/plausible.io
This PR:
DropdownContent
was expecting a prop with a different namecomponentDidMount
. I've introduced a custom hook that's basically auseEffect
but does not run on the initial render.This prop name mismatch was responsible for two wrong behaviours:
1) Filter button always displaying this (even without any applied filters):
2) When "+ Add filter" was clicked, displaying this on safari for a second or so:
Tests
Changelog
Documentation
Dark mode