Can AngularStrap bs-select be configured to be a dropup? - angularjs

I tried adding the bootstrap dropup class to a <select> using bs-select. It made the arrow point upwards but the menu was still displayed below the button. Is it possible to make a bs-select menu be displayed above the button, like it is for a regular Bootstrap "dropup" control? I tried to use BootstrapAdditions thinking that might help, but could not get it to work.

Related

Next JS Custom Select dropdown icon on click does not trigger the options to display

I am new to Next JS and I have a custom select menu dropdown with an array of options. The select has an arrow icon that I included by using css psudo ::after with background image. When the user clicks the icon(svg), the dropdown is not triggered and I am not sure how to make this work.
I have tried using useRef and setting it to the component then on button click I tried to use ref.current.click() which doesnt trigger the drop down.
I also tried including the arrow icon inside the component rather than use CSS but this was unsuccessful as well.
Can someone please advise me how to make this functionality work? Thank you in advance for any help, it is much appreciated.

How to display multi column in bootstrap dropdown

I have used bootstrap dropdown control (below Tag) in react js application.It works fine as per my requirement.I would like to know how to show multi column in dropdown.For example I need to display Customer Code and Customer Name in dropdown
<select class="form-control">
I don't know react, but you must define the row and cols inside your dropdown code and fire the stopPropagation() event on click or hover to prevent the dropdown closes itself after doing a click in the container.

Differentiating arrow clicks between multiple UI-Select controls on one page

Hi I would like to customize behavior of the ui-select little bit. I use two bootstap themed ui-select controls on my page with the help of templatecaches. In the template, I wired up arrow button click event using ng-click tag. That way I can easily catch the click event on the arrow button, and in my controller I can open a popup using function, for instance:
<button ng-click = "someFunctionInTheScope()">
For instance if I have two of those ui-select elements in my view, I need to differentiate which arrow button is clicked to display the correct popup. Since I am using the same template for two ui-select controls and since theoretically I can have any number of these controls on my page, I can not easily add a parameter to the method in the template to differentiate which arrow image of which ui-select control is clicked:
<button ng-click= "someFunctionInTheScope(1)">
Because both ui-select control would be using the same template code and 1 would be passed to the controller function for both of them.
Therefore I need to find a more clever way of changing the template dynamically once and for each control.
So I thought about having something like
<button ng-click= "someFunctionInTheScope($select.id)">
but when I debug it I see that functions parameter is undefined, every time it is clicked.
Can somebody please show me how to hack this?
There is no id property on the $select object. You're best bet is to pass something through the scope of the element containing the ui-select boxes. In other words, your code needs to generate a unique identifier for each ui-select box you have. This could be the $index property of an ng-repeat block, a timestamp, or something dependent on other context.
A little more context and I can provide a more specific answer.

How to add button inside listbox and do some action

i am working on listbox using angualrjs.
<select size="10" id="myselection" ng-model="currentItems" ng-options="s.id as s.text for s in roles" ng-change="getCategory(currentItems)"></select>
but i dont know how to add button inside listbox and perform some action after click of add button.
I would suggest you to use some component library for example Angular-UI/Bootstrap, which provides nice pack of bootstrap components.
Dropdown is probably what you want to use.
http://angular-ui.github.io/bootstrap/#/dropdown
It looks like select which contains ordinary links where you can use ng-click.

ng-click stops working when using a kendo grid

I am trying to get a ng-click event to fire correctly when integrating the Angular Kendo UI.
The following Plunker shows a working example, click the button click me and a modal window appears, however if I add the kendo-grid attribute to line 18 of index.html then the pop up does not work. e.g. changing:-
<table>
to:
<table kendo-grid>
Then the modal popup does not work. I suspect that when the grid is rendered then angular loses the binding. Not sure how to fix it. Can anyone help?
The problem is the angularjs-kendo labs master file does not support command binding and a couple of issues have been raised.
Basically you need to take the javascript from the compile-kendo-grid-rows
See working plunker.

Resources