Skip to content

Commit f9bd3b5

Browse files
committed
rename apikey attribute to api_key
this makes the attribute consistent with the rest of the API parameters
1 parent 75c3f0b commit f9bd3b5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This repo contains an autocomplete Web Component for use with the [Geocode Earth
66

77
```html
88
<ge-autocomplete
9-
apikey='ge-abc123'
9+
api_key='ge-abc123'
1010
size='5'
1111
lang='en'
1212
boundary.country='de'

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="logo"></div>
1212

1313
<ge-autocomplete
14-
apiKey='ge-9ccf84885004f273'
14+
api_key='ge-9ccf84885004f273'
1515
size='4'
1616
lang='en'
1717
boundary.country='de'

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const WebComponent = ({ host, ...autocompleteProps }) => {
5151
class GEAutocomplete extends HTMLElement {
5252
static get observedAttributes() {
5353
return [
54-
'apikey',
54+
'api_key',
5555
'placeholder',
5656
'autofocus',
5757
'debounce',
@@ -77,7 +77,7 @@ class GEAutocomplete extends HTMLElement {
7777
// to the react component
7878
get props () {
7979
return compact({
80-
apiKey: this.getAttribute('apikey')?.trim(),
80+
apiKey: this.getAttribute('api_key')?.trim(),
8181
placeholder: this.getAttribute('placeholder'),
8282
autoFocus: this.getAttribute('autofocus') !== null,
8383
debounce: parseInt(this.getAttribute('debounce')),

0 commit comments

Comments
 (0)