Accessing search params via beforeLoad #800
Answered
by
tannerlinsley
shansmith01
asked this question in
Q&A
Replies: 1 comment
-
Make sure you’re on the latest.
Tanner Linsley
…On Nov 7, 2023 at 5:22 PM -0700, Shannon Smith ***@***.***>, wrote:
I understnad that we should be able to access search params from beforeLoad.
If I do this...
validateSearch: (search: Record<string, unknown>): SitesSearchParams => { return { token: search.token as string } }, beforeLoad: async (all) => { console.log(all) },
And check my console all I see is
{abortController: AbortController, params: {…}, preload: false, context: {…}} abortController : AbortController {signal: AbortSignal} context : {getSite: ƒ} params : {site_id: '1234'} preload : false [[Prototype]] : Object
Noting about search params. Can anyone help me access the search object?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
shansmith01
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I understnad that we should be able to access search params from beforeLoad.
If I do this...
validateSearch: (search: Record<string, unknown>): SitesSearchParams => { return { token: search.token as string } }, beforeLoad: async (all) => { console.log(all) },
And check my console all I see is
{abortController: AbortController, params: {…}, preload: false, context: {…}} abortController : AbortController {signal: AbortSignal} context : {getSite: ƒ} params : {site_id: '1234'} preload : false [[Prototype]] : Object
Noting about search params. Can anyone help me access the search object?
Beta Was this translation helpful? Give feedback.
All reactions