Skip to content

Commit fe3d66c

Browse files
authored
Merge pull request #59 from trippo/patch-3
Unset autocompleteFieldColumnSpan params on HasGooglePlaceApi
2 parents c2d83c3 + fb7b275 commit fe3d66c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Concerns/HasGooglePlaceApi.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ protected function getPlaceAutocomplete($search)
8080
{
8181
$this->setGoogleApi();
8282

83+
unset($this->params['autocompleteFieldColumnSpan']);
84+
8385
if ($this->placesApiNew) {
8486
return $this->googlePlaces->autocomplete($search, false, ['*'], $this->params);
8587
}

src/Forms/Components/GoogleAutocomplete.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class GoogleAutocomplete extends Component
3333

3434
public ?array $withFields = null;
3535

36-
protected int|array|string|Closure $autocompleteFieldColumnSpan = 'full';
36+
protected int|array|Closure $autocompleteFieldColumnSpan = 1;
3737

3838
protected int|Closure $autocompleteSearchDebounce = 2000; // 2 seconds
3939

@@ -193,7 +193,7 @@ public function withFields(null|array|string|Closure $fields): static
193193
$this->withFields = $fields;
194194

195195
// Rebuild schema with new fields
196-
$this->schema($this->buildSchema());
196+
$this->schema($this->buildSchema())->columns($this->autocompleteFieldColumnSpan);
197197

198198
return $this;
199199
}
@@ -224,7 +224,7 @@ public function getWithFields(): ?array
224224
return $evaluated;
225225
}
226226

227-
public function autocompleteFieldColumnSpan(int|array|string|Closure $autocompleteFieldColumnSpan = 'full'): static
227+
public function autocompleteFieldColumnSpan(int|array|Closure $autocompleteFieldColumnSpan = 1): static
228228
{
229229
$this->autocompleteFieldColumnSpan = $autocompleteFieldColumnSpan;
230230

@@ -233,7 +233,7 @@ public function autocompleteFieldColumnSpan(int|array|string|Closure $autocomple
233233
return $this;
234234
}
235235

236-
public function getAutocompleteFieldColumnSpan(): int|array|string|null
236+
public function getAutocompleteFieldColumnSpan(): int|array|null
237237
{
238238
return $this->evaluate($this->autocompleteFieldColumnSpan);
239239
}

0 commit comments

Comments
 (0)