Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 6175418

Browse files
committed
Allow timezone custom select to be fixed position
1 parent 91fb54f commit 6175418

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

resources/views/partials/timezone-select-custom.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
<x-custom-select :filterable="$filterable" :optional="$optional" :placeholder="$placeholder" :multiple="$multiple" {{ $attributes }}>
1+
<x-custom-select :filterable="$filterable"
2+
:optional="$optional"
3+
:placeholder="$placeholder"
4+
:multiple="$multiple"
5+
:fixed-position="$fixedPosition"
6+
:max-width="$maxWidth"
7+
{{ $attributes }}
8+
>
29
{{ $slot }}
310

411
@foreach (app('fc-timezone')->only($only)->all() as $region => $regionTimezones)

src/Components/Inputs/TimezoneSelect.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TimezoneSelect extends Select
2121
public bool $filterable;
2222
public bool $optional;
2323
public $placeholder;
24+
public bool $fixedPosition;
2425

2526
public function __construct(
2627
string $name = '',
@@ -40,7 +41,8 @@ public function __construct(
4041
bool $useCustomSelect = false,
4142
bool $filterable = true,
4243
bool $optional = false,
43-
string $placeholder = 'Select a timezone'
44+
string $placeholder = 'Select a timezone',
45+
bool $fixedPosition = false
4446
) {
4547
parent::__construct(
4648
$name,
@@ -64,5 +66,6 @@ public function __construct(
6466
$this->filterable = $filterable;
6567
$this->optional = $optional;
6668
$this->placeholder = $placeholder;
69+
$this->fixedPosition = $fixedPosition;
6770
}
6871
}

0 commit comments

Comments
 (0)