Skip to content

Hotfix/fix product type switching#29

Merged
alecritson merged 4 commits intomainfrom
hotfix/fix-product-type-switching
Jan 4, 2022
Merged

Hotfix/fix product type switching#29
alecritson merged 4 commits intomainfrom
hotfix/fix-product-type-switching

Conversation

@alecritson
Copy link
Collaborator

Fixes #4

Before, when mapping attributes it was using the loop index to determine the position in the array for wire:model. This was causing issues with Alpinejs when switching product type and a different set of attributes get loaded in. Specifically it was @entangle on the rich text input having issues.

I've found by using the $attribute->id for the mapping fixes this issue and since attributes will all have unique ID's this shouldn't cause any problems.

@alecritson alecritson requested a review from glennjacobs January 4, 2022 12:45
glennjacobs
glennjacobs previously approved these changes Jan 4, 2022
@alecritson alecritson enabled auto-merge (squash) January 4, 2022 13:36
@alecritson alecritson merged commit 068a5fe into main Jan 4, 2022
@alecritson alecritson deleted the hotfix/fix-product-type-switching branch January 4, 2022 13:38
glennjacobs pushed a commit that referenced this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing Product Type on product edit/creation causes an alpinejs issue

2 participants