#Real-time searching

1 messages · Page 1 of 1 (latest)

gritty aurora
#

Hi all,

I have a search username field on my website that's in the header throughout all requests, how would I wire this up with Inertia? If this was page specific I could use redirect()->back() or whatever.

I know I could do an api endpoint but not sure if theres anything Inertia related that would be better

tardy summit
#

Not sure if that would really work with Inertia. Since it's a global thing, you might be able to do this with a partial reload and using the middleware/global props

gritty aurora
jagged forum
#

That’s doable with the way Robert mentioned, but from my experience I’d highly advice just going with api.

If you’re performance conscious and you put global search inside shared props you’ll have to make all of your props on all of your pages lazy so that only the search is triggered on the partial reloads

winged pecan
jagged forum
gritty aurora
#

I think this is sorta why I’d love to move away from Inertia eventually, so I can just do everything via an API. Then just apply rate limits instesd

winged pecan
jagged forum
tardy summit
winged pecan
jagged forum