fix: random generated uuid will be full length (not 7 characters)

This commit is contained in:
Andras Bacsai
2024-07-25 13:31:01 +02:00
parent debd2a3433
commit 6a4aa492c0
31 changed files with 54 additions and 54 deletions

View File

@@ -30,7 +30,7 @@ class Datalist extends Component
public function render(): View|Closure|string
{
if (is_null($this->id)) {
$this->id = new Cuid2(7);
$this->id = new Cuid2();
}
if (is_null($this->name)) {
$this->name = $this->id;

View File

@@ -27,7 +27,7 @@ class Input extends Component
public function render(): View|Closure|string
{
if (is_null($this->id)) {
$this->id = new Cuid2(7);
$this->id = new Cuid2();
}
if (is_null($this->name)) {
$this->name = $this->id;

View File

@@ -30,7 +30,7 @@ class Select extends Component
public function render(): View|Closure|string
{
if (is_null($this->id)) {
$this->id = new Cuid2(7);
$this->id = new Cuid2();
}
if (is_null($this->name)) {
$this->name = $this->id;

View File

@@ -41,7 +41,7 @@ class Textarea extends Component
public function render(): View|Closure|string
{
if (is_null($this->id)) {
$this->id = new Cuid2(7);
$this->id = new Cuid2();
}
if (is_null($this->name)) {
$this->name = $this->id;