protonemedia / laravel-splade

💫 The magic of Inertia.js with the simplicity of Blade 💫 - Splade provides a super easy way to build Single Page Applications (SPA) using standard Laravel Blade templates, and sparkle it to make it interactive. All without ever leaving Blade.
https://splade.dev
MIT License
1.47k stars 111 forks source link

feature request: allow target _blank attribute to Link component #486

Closed ibrunotome closed 7 months ago

ibrunotome commented 1 year ago

Description:

It's great that I can use confirm dialogs and the away attribute

<Link
    away
    confirm="Enter the danger zone..."
    confirm-text="Are you sure?"
    confirm-button="Yes, take me there!"
    cancel-button="No, keep me save!"
    href="/danger">
    Danger Zone
</Link>

But I'm in a use case that I would need to redirect away with a target= "_blank"

Would be great also if with the target blank I would call a function with an @confirmed event for example:

<Link
    away
    target="_blank"
    @confirmed="myFunctionToStoreSomeInfo"
    confirm="Enter the danger zone..."
    confirm-text="Are you sure?"
    confirm-button="Yes, take me there!"
    cancel-button="No, keep me save!"
    href="/danger">
    Danger Zone
</Link>