See the question and my original answer on StackOverflow

The first line should work but, believe it or not, it's a 2 years bug that's been fixed yesterday: Can't access payload in action method

The issue is the payload (so here { searchString: "test" }) was simply not passed to the action's run method Fixes #176504 as shown here:

Fixes #176504

PS: The fix is not yet release in the downloadable version as of today.