Skip to content

Commit 374c085

Browse files
authored
Merge pull request #16 from lob/address-form-secondary
Fixes bug where secondary line was getting lost
2 parents 60859c2 + f5ebc08 commit 374c085

File tree

13 files changed

+34833
-35874
lines changed

13 files changed

+34833
-35874
lines changed

.eslintrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"parser": "babel-eslint",
2+
"parser": "@babel/eslint-parser",
33
"extends": [
4-
"standard",
54
"standard-react",
65
"plugin:prettier/recommended",
7-
"plugin:react/recommended"
6+
"plugin:react/recommended",
7+
"react-app"
88
],
99
"env": {
1010
"node": true
@@ -18,7 +18,7 @@
1818
},
1919
"settings": {
2020
"react": {
21-
"version": "16"
21+
"version": "18"
2222
}
2323
},
2424
"rules": {

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
node: ['12', '14']
11+
node: ['16']
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Setup

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# See https://help.github.com/ignore-files/ for more about ignoring files.
33

4+
coverage/
5+
46
# dependencies
57
node_modules
68

example/src/AddressFormDemo.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ const AddressFormDemo = ({ apiKey }) => {
2020
setSelectedResult(selected)
2121
}
2222

23+
const handleChange = ({ address }) => {
24+
setSelectedResult({ ...selectedResult, value: address })
25+
resetApiResult()
26+
}
27+
2328
const handleSubmit = () =>
2429
resetApiResult()
2530
.then(() => verify(apiKey, selectedResult.value))
@@ -31,7 +36,7 @@ const AddressFormDemo = ({ apiKey }) => {
3136
<h2>Address Form</h2>
3237
<AddressForm
3338
apiKey={apiKey}
34-
onFieldChange={resetApiResult}
39+
onFieldChange={handleChange}
3540
onSelection={handleSelect}
3641
/>
3742
<button

0 commit comments

Comments
 (0)