asantibanez / laravel-blade-sortable

Custom Blade components to add sortable/drag-and-drop HTML elements in your apps.
MIT License
412 stars 79 forks source link

Alpine v3 #9

Open MariosMaggot opened 3 years ago

MariosMaggot commented 3 years ago

It currently doesn't work with new version of Alpine. Is there any plans for alpine v3 support?

diazsasak commented 3 years ago

This is the error when do the sorting and using alpinejs v3

Unable to call component method. Public method [__v_raw] not found on component: [profile.edit-profile-page]

ehsantalkhouncheh commented 3 years ago

Any news about alpinejs v3?

laraben commented 3 years ago

Some ETA when Alpine v3 will work?

SebastianSchoeps commented 3 years ago

@asantibanez Liking the package, but it's the same for me...

SebastianSchoeps commented 3 years ago

As a workaround I have done the following:

Change:

this.wireComponent.call(
    this.wireOnSortOrderChange,
    this.sortOrder,
    previousSortOrder,
    this.name,
    from,
    to,
)

to

@this[this.wireOnSortOrderChange](
    this.sortOrder,
    previousSortOrder,
    this.name,
    from,
    to,
)
Hesesses commented 3 years ago

Any updates on this?

brocorp-dev commented 3 years ago

Hi,

We encountered same issue with Alpine V3.

As @SebastianSchoeps workaround works fine, we submitted PR #11

nam-co commented 3 years ago

Same problem with alpine V3 "__v_raw"

nam-co commented 3 years ago

Hola Andres @asantibanez , please when you can check the PR, such a good package

nam-co commented 3 years ago

Hi,

We encountered same issue with Alpine V3.

As @SebastianSchoeps workaround works fine, we submitted PR #11

Hi @brocorp-dev I don't know if its just me, but Im getting an error: Trying to get property 'id' of non-object (View: .../components/scripts.blade.php) any ideas ? appreciate the help

rolinbos commented 3 years ago

@nam-co I got that error too. I was able to solve it by adding the following to the page where I'm using it: maybe this will help you too.

nam-co commented 3 years ago

Thanks @rolinbos , I ended using sortable directly because I needed features like 'clone', but I will keep it in mind, is this a unreleased version of sortable?

iksaku commented 3 years ago

Just got across this, ended up using a method similar to @SebastianSchoeps, however, just replaced references to this.wireComponent to this.$wire.