| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Test FAILed. |
Sorry, something went wrong.
|
Test PASSed. |
Sorry, something went wrong.
|
Test PASSed. |
Sorry, something went wrong.
|
💯 |
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
Sorry, something went wrong.
|
Test PASSed. |
Sorry, something went wrong.
…nction Add Template factory function and use it in the ui/builder, Repeater and ListView components
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This will allow more flexible itemTemplate to be used in the Repeater and ListView including factory functions written in pure JavaScript or originating from other framework such as Angular.
This may be perceived as a breaking change, since the template builder will now return a function instead of string. These strings however, usually round-trip back to "ui/builder".parse, and the parse now has overload to accept both string and function types.
It is recommended in future to use "ui/core/view".Template for itemTemplate properties in child controls, but ours will still accept strings so they can be as backward compatible as possible.
Some existing controls that expose itemTemplate string property, that are not updated after this change, may get function for value instead of string and trigger errors elsewhere should the template be used as a string.
The ListView and Repeater no longer pass themselves as context when the template is realized, instead the template captures the context from the page when the template is parsed.