Skip to content

[Live][RFC] Auto-set field values to data-model #473

Closed
@weaverryan

Description

@weaverryan

Hi!

Currently we require you to set the "value" of a data-model field:

<input data-model="firstName" value="{{ firstName }}">

The proposal is to not require this:

<input data-model="firstName">

Instead, on initial load (and re-render), the actual firstName model value from your PHP component (i.e. the $firstName property) would be used to set the value on the input.

This is consistent with the behavior from both Livewire and frameworks like Vue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReviewedHas been reviewed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions