Sonata admin, override select in template? - sonata-admin

I'm using sonata admin and i am overriding a template.
I created a select in this template, and when I display the page, I can't see my select, but a html code with UL and LI.
It seems Sonata override select in his template by his code.
How can i remove that ? I want MY select and not the select overrided by sonata.

Sonata uses select2, a javascript library to customize the render of select elements.
To disable select2 on your select you need to add the attribute data-sonata-select2="false" :
<select data-sonata-select2="false"></select>
Related code in sonata:
https://github.com/sonata-project/SonataAdminBundle/blob/master/Resources/public/Admin.js#L76

You can also turn of select2 for the whole sonata:
sonata_admin:
options:
use_select2: false # disable select2
http://sonata-project.org/bundles/admin/master/doc/reference/select2.html

Related

Angular UI Bootstrap tab select vs ng-click

Angular UI Bootstrap Tabs support a "select" parameter.
An optional expression called when tab is activated. Supports $event in template for expression.
What does select offer over ng-click?
Like shown in the documentation, you are able to select a tab external, e.g. via a seperate button. In this case, the ng-click wouldn't work, unlike the select parameter.

How to add input box and submit button to add option dynamically for select box dropdown angularjs and bootstrap?

How to add option dynamically to a select box? suppose if there is nod
related data to be select in selectbox there should be an option to
add new option using input box.
If you are using angular-ui-bootstrap, use typeahead directive.
https://angular-ui.github.io/bootstrap/#/typeahead
No. 4 example should be helpful for you. And to add a new option, you have to code that manually. Beacuse, add a new option isn't available on select elements both in ui-bootstrap and angular material.

How to add onSelect & onDeselect events Kendo multi-select AngularJS?

I am using Kendo multi-select to implement a tag based filter widget. I am using Angular as my framework.
I have stucked in adding onSelect and onDeSelect events to be triggered when the user select, deselect a tag. I could only found this example. But I can't find a way how I can do it with Angular.
Can some one please help?
What about putting the handlers in the options object like this:
http://dojo.telerik.com/oDanU
Adding a function for onSelect() and specify it as the onSelect method in HTML by
<select kendo-multi-select
k-data-source="vm.filterGroup.groupItems"
k-select="vm.onSelect"</select>
workd for me.

angular ui-select search functionality for list is not needed how to hide that

angular ui-select search functionality.
I don't want to use search list option, how can I hide that option.
My Demo : LINK
> http://plnkr.co/edit/CKHbiSQ4tZXTjOyxpyBK?p=preview
I don't want this search option. default behavior of ui-select.
Please refer image.
I think you are looking to disable feature of select an option by typing. You need to set search-enabled to false.
Documentation https://github.com/angular-ui/ui-select/wiki/ui-select
Updated Plunker: http://plnkr.co/edit/IwBWefw1TIq5hvOrR1hO?p=preview

how to use css classes inside angular formly

I am using angular formly. I read the documentation,but they didn't mention how to apply css classes from options.
I am trying to apply kendo ui classes to form fields but of no use.
Can anyone help me?
here is my jsbin
http://jsbin.com/golehimize/edit?html,output
Here's how you apply a custom class to the formly-field element: https://jsbin.com/foqixe/edit?html,js,output
I'm not sure what classes you're wanting to apply, but this would be the way to do it (see the email field configuration).

Resources