Custom hook useShowModal to make reusable logic for opening modals
Custom hook useSearchParams to make reusable logic for location search, so whenever we want to add stuff such as orderby, page, and so on, then we can use that hook. It also exports functions to easily set or update the search params.
UsersScreen now has more examples of how to do orderBy, pagination and add/edit modal for items
Breaking changes?
Opening Modals happens via action and actionId search params in the url, so it is easier to remember the filters such as orderBy and page when opening the modals, as it before cleared the search filters.
Ant design add filters and improvements
What are you adding?
useShowModal
to make reusable logic for opening modalsuseSearchParams
to make reusable logic for location search, so whenever we want to add stuff such asorderby
,page
, and so on, then we can use that hook. It also exports functions to easily set or update the search params.orderBy
,pagination
and add/edit modal for itemsBreaking changes?
action
andactionId
search params in the url, so it is easier to remember the filters such asorderBy
andpage
when opening the modals, as it before cleared the search filters.Related PR