You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Great library, much appreciate the work that has gone into it.
I'm using the library in the "expected" mode, to render addresses, but I'm also attempting to use the configuration to render address forms, based on a country. So, for example, if someone is from Japan, then the address input form should match the format from address-formats.ts, here...
And then using the array format to determine which fields to display. Obviously, not what the library is designed for, but the address format information is very useful in this mode. However, because this code here...
Because setAddress1 and setDong both get set at the same time, I can't effectively use this (admittedly hacky) method to get the address format, because it matters which set method I call first.
However, if the address formats were available from the PostalAddress object, e.g. .getFormat({ country: 'KR', type: 'personal' }), then that would be super useful to me.
Any chance? Should I raise a PR?
Thanks, Johnny
The text was updated successfully, but these errors were encountered:
Hi. Great library, much appreciate the work that has gone into it.
I'm using the library in the "expected" mode, to render addresses, but I'm also attempting to use the configuration to render address forms, based on a country. So, for example, if someone is from Japan, then the address input form should match the format from address-formats.ts, here...
i18n-postal-address/lib/address-formats.ts
Line 253 in 37ca9ef
I had tried to do this by just setting all of the setters, like this:
And then using the array format to determine which fields to display. Obviously, not what the library is designed for, but the address format information is very useful in this mode. However, because this code here...
i18n-postal-address/lib/postal-address.ts
Line 165 in 37ca9ef
clashes with
i18n-postal-address/lib/postal-address.ts
Line 209 in 37ca9ef
Because setAddress1 and setDong both get set at the same time, I can't effectively use this (admittedly hacky) method to get the address format, because it matters which set method I call first.
However, if the address formats were available from the PostalAddress object, e.g.
.getFormat({ country: 'KR', type: 'personal' })
, then that would be super useful to me.Any chance? Should I raise a PR?
Thanks, Johnny
The text was updated successfully, but these errors were encountered: