Alpine wire entangle causes "Uncaught (in promise) TypeError: Cannot read properties of null"
I'm using a custom form component, based on Textarea.
As soon as I put this in:
and I click a button on the page, I get:
That "child_description" is inside a JSON field:
When the field has a value, the error is gone. But initially, the JSON is null. (empty string doesn't solve the problem)
Any idea how to solve this?
3 Replies
can you try this
x-data="{ state: $wire.{{ $applyStateBindingModifiers("\$entangle('{$getStatePath()}')") }} }"
That gives
Public method [$entangle] not found on component
. Maybe because I'm on v2?
I tried this:
state: $wire.{{ $applyStateBindingModifiers('entangle(\'' . $getStatePath() . '\')') }}
, which gave the same error.Oh shit sorry didn't notice this is V2, my bad