Skip to content

Commit

Permalink
Do not set id by default
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 authored Oct 14, 2024
1 parent c6d4de9 commit 4f699bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Support/Html/Mixins/BaseElementMixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ public function wireModel(): mixed
{
return function (string $key, ?string $modifiers = null) {
/** @var BaseElement $this */
$directive = str('wire:model')
$attribute = str('wire:model')
->when($modifiers, fn (Stringable $str) => $str->append(".{$modifiers}"))
->squish();

return $this
->attribute($directive->value(), $key)
->attribute('id', $key);
return $this->attribute($attribute->value(), $key);
};
}
}

0 comments on commit 4f699bf

Please sign in to comment.