Skip to content

Adding to DOM causes endless requests #7

@MCKLtech

Description

@MCKLtech

I've encountered an odd error. When I add the tagify code, it seems to cause endless requests (As if the DOM is being constantly updated)

<div wire:ignore>
                    <input data-pharaonic="tagify"
                           data-component-id="{{$this->id}}"
                           wire:model="state.group"
                           data-suggest-list='{{json_encode(collect($groups)->pluck('name')->unique())}}'
                           data-suggest
                           data-direct
                           class="min-w-full bg-white shadow block border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm"
                           placeholder="{{__('Type here to enter a new group.')}}"
                    >
                </div>

Removing the code stops the requests. It seems to be endlessly updating the state.group:

updates
: 
[{type: "callMethod", payload: {id: "3kbg", method: "$set",…}}]
0
: 
{type: "callMethod", payload: {id: "3kbg", method: "$set",…}}
payload
: 
{id: "3kbg", method: "$set",…}
id
: 
"3kbg"
method
: 
"$set"
params
: 
["state.group", ["Team A", "Team B",…]]
0
: 
"state.group"
1
: 
["Team A", "Team B",…]
type
: 
"callMethod"

Edit: Removing all items from the field stops the requests. So it seems like if any values in set, it will just continually make HTTP calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions