Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Unable to get select to work with relationships with Livewire #47

@kurucu

Description

@kurucu

Following the docs, I'm trying to get Livewire to work with relationships and a multi-select.

Code is as follows:

<x-form wire:submit.prevent="submit">
    @wire
            <x-form-input name="post.title" label="Title" :readonly="!$isEditing" />

            <x-form-textarea name="post.description" label="Description" :readonly="!$isEditing" />

            @if($isEditing)
                <x-form-select name="post.tags[]" :options="$this->allTags" multiple many-relation label="Applicable Tags" />
            @endif
    @endwire
</x-form>

Whilst the options are populated, the chosen ones are not selected when the form is shown, and any chosen ones are not saved when the form is submitted.

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