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
{{ message }}
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
In learning PCF controls, I chose to rebuild your solution to familiarize myself with PCF underpinnings and tailor the solution to meet 3 needs. The latter 2 are not part of the issue, but are related and included for context.
1. Support a multiline composite address field:
While your github support issue #2 indicates multiline is supported, we couldn't bind it to a multiline composite address field. I noted in the manifest that the value property is limited to singleline.Text, and does not allow for SingleLine.TextArea. So, I added a type-group to allow binding to either. If this was the only change, I'd have gladly just confirmed it works in a live system, packaged it up and sent you a pull request + thank you.
But, in the code, I've also noticed this replacement of newlines with commas:
In the harness, I find that newline (/n) characters are showing on the console log, but don't render as a multiline on a field rendered in the control itself. Can you clarify the difference between these two lines and why the mainAddressField.value is being reformatted with commas? How do I get the control to render multiline?
2. Eliminate extraneous newlines & commas if any values were null,
If we include an addressline2, but the value is null, we'd end up with either an extra newline or comma. Rather than using the formatAddress method (which is very cool, BTW), I wrote a less flexible, but more specific method to format for US addresses which only adds line breaks and commas if the relevant values were present. It would be awesome if there were a way to merge it with the flexibility of your format string based approach, but that is a bit beyond me.
3. Add an separate zipcode extension field: Easy enough. Done.
You are a stellar leader in the community. I'm aware of some training videos you've put together and will be carving out some time to review them.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Andrew,
In learning PCF controls, I chose to rebuild your solution to familiarize myself with PCF underpinnings and tailor the solution to meet 3 needs. The latter 2 are not part of the issue, but are related and included for context.
1. Support a multiline composite address field:
While your github support issue #2 indicates multiline is supported, we couldn't bind it to a multiline composite address field. I noted in the manifest that the value property is limited to singleline.Text, and does not allow for SingleLine.TextArea. So, I added a type-group to allow binding to either. If this was the only change, I'd have gladly just confirmed it works in a live system, packaged it up and sent you a pull request + thank you.
But, in the code, I've also noticed this replacement of newlines with commas:
In the harness, I find that newline (/n) characters are showing on the console log, but don't render as a multiline on a field rendered in the control itself. Can you clarify the difference between these two lines and why the mainAddressField.value is being reformatted with commas? How do I get the control to render multiline?
2. Eliminate extraneous newlines & commas if any values were null,
If we include an addressline2, but the value is null, we'd end up with either an extra newline or comma. Rather than using the formatAddress method (which is very cool, BTW), I wrote a less flexible, but more specific method to format for US addresses which only adds line breaks and commas if the relevant values were present. It would be awesome if there were a way to merge it with the flexibility of your format string based approach, but that is a bit beyond me.
3. Add an separate zipcode extension field: Easy enough. Done.
You are a stellar leader in the community. I'm aware of some training videos you've put together and will be carving out some time to review them.
The text was updated successfully, but these errors were encountered: