You need to sign in to do that
Don't have an account?
Sergio Mac Intosh
LWC Wire Method on 1 Parameter
Hi All,
I have a Wired Method like this:
The method is working correctly, but the method is running everytime the recordId or the searchstring is changed. I would only like to run it when the searchstring is being changed & also not onload of the component. How can i manage this?
I have a Wired Method like this:
recordId = ''; searchString; @wire(searchUsers, {recordId: '$recordId', searchString: '$searchString'})
The method is working correctly, but the method is running everytime the recordId or the searchstring is changed. I would only like to run it when the searchstring is being changed & also not onload of the component. How can i manage this?
Instead of using the wire method you can the method as mentioned below. you can write the following code inside the js Function.
Hope it helps you!