wire-elements / spotlight

Livewire component that brings Spotlight/Alfred-like functionality to your Laravel application.
MIT License
912 stars 71 forks source link

Add prefill command and input #66

Closed usernotnull closed 2 years ago

usernotnull commented 2 years ago

This will add go-spotlight and prefill-spotlight listeners which complement toggle-spotlight

Sample use case:

@click="$dispatch('toggle-spotlight'); 
$dispatch('go-spotlight', {{ md5(Spotlight\ViewUserCommand::class) }}'); 
$dispatch('prefill-spotlight', 'john');"

If for example, the user wants to search for articles and doesn't want to see the whole list of available commands, this will quickly take him there.