Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typeahead: Conditional loading of Handlebars.js #195

Closed
PaulVanSchayck opened this issue Nov 5, 2014 · 2 comments
Closed

Typeahead: Conditional loading of Handlebars.js #195

PaulVanSchayck opened this issue Nov 5, 2014 · 2 comments

Comments

@PaulVanSchayck
Copy link

Per default Handlebars.js is loaded when using the typeahead widget. This is a relative big library, especially when you're not using it. Right now I'm using the following to unload it (after calling the widget)

/* @var $this yii\web\View */
unset($this->getAssetManager()->getBundle('kartik\widgets\TypeaheadAsset')->js[1]);

Would it be an idea to make the loading more conditional, or optional?

@kartik-v
Copy link
Owner

kartik-v commented Nov 5, 2014

You can now configure the useHandleBars boolean property.

@PaulVanSchayck
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants