I have a grid and I need to make the line selected, when the user clicks anywhere on it, that is, today I have a checkbox to select the line, I was wondering if there is any configuration or something of the Ext itself that give me that.
Today i have this:
And i want to select the row, when user clicks anywhere on it!
Basically the same as pressing the keyboard control (ctrl) and clicking on the line
Checkbox selection model has property checkSelector (sorry you dont specified framework version). set checkSelector: '.x-grid-row' to solve your problem
https://fiddle.sencha.com/#view/editor&fiddle/32g9
Related
I am using ng-zorro-select using angular. This is a library but it's based on standard html and css.
Suppose i have this page:
table with select
This is what is happening:
When i press TAB the focus goes to the first select
then i can type in my search option
to select the option i have to press ENTER on my keyboard
to move to the next select i have to press TAB
This is what i want:
Pressing tab goes to the first select (or another one in the row, but i can't get tabindex to work for me).
I type in my search
Now instead of pressing ENTER i would like to press TAB to select my option
Pressing TAB again will move the focus to the next element
My understanding here is that it has something to do with the presets that ng zorro team decided on the select option. But since it's a standard select i can't figure out how to override that specific property.
Using a simple html <select> works great so it is doable, i just don't know how and what i have to override to make it work.
External Resources:
If you want to play around you can use this Stackblitz ng-zorro-select or visit the ng zorro select page.
I honestly know nothing about the tab key and how to handle onFocus events in angular, or how to give a specific element focus on angular.
Anyway if you do, thanks for helping me.
If you look at the source code of the component they're calling a method to close it on TAB press.
If you want to keep using this component you could do a wrapper component that passes down everything but overrides the method onKeyDown to match your expected behavior.
The software I am debugging uses ui-bootstrap-tpls-1.1.2.
By default, if I open a modal and then click on one of the text boxes that has a a lookahead dropdown menu, the dropdown menu opens.
If I then select an option from the dropdown and click on that textbox again to pick a different option, the dropdown will not open this time, unless I delete at least one character from the original selection.
How do I get that dropdown menu to open every time I click on the text box, regardless of whether something has already been selected?
thanks
Things I've tried:
onclick="TextBoxName.Text = String.Empty;"
onfocus="this.value=''"
Clearing the textbox is not necessary, but I couldn't find anything in the documentation that would provide another way to accomplish this without clearing the text 'onclick' or 'onfocus'. Neither of those two functions above gave the result that I had hoped for.
The code for the modal:
below is a pick of the modal.
The red circle shows a textbox where a selection has already been made.
If I click on that textbox again, the dropdown will not appear until I delete at least one character from "2017/18 Items":
In in-cell edit mode, grid values do not update when clicking a different row. The update is only triggered when the user hits enter, when clicking outside of the grid, OR by tabbing/clicking to another cell in the same row. The other examples I've seen don't have this behavior so I'm wondering what I might be doing wrong. This has been an issue for sometime now and it has to be fixed before going live.
I have been able to duplicate the issue in an isolated state. Implementing drag and drop reordering (Kendo Sortable) seems to cause this behavior. Again, the behavior is when you are in an editor, change the value in the editor and click an editor in a different row - you will notice that the value doesn't update. Is this a documented bug? What is your suggested workaround?
Here is a jsfiddle demonstrating the issue:
https://jsfiddle.net/bhr7Lmpy/1/
<script async src="//jsfiddle.net/bhr7Lmpy/1/embed/"></script>
The Telerik Team responded here:
https://www.telerik.com/forums/in-in-cell-edit-mode-grid-values-do-not-update-when-i-click-a-different-row#aIdr3qwkX0aJnnNY9irSJg
You might be able to put a focusout event on the grid cell that programatically presses the enter key or clicks the save button.
How to select combo value on click of enter.
I am using combobox and values are coming by using mouse click and click on enter. But When I choose second value by click on enter 1st value is disappear. I a using keyboard and value appear in search. How to resolve this.
In my fiddler please select two value by click on enter, first value is disappear by clicking the second one.
Please help me to fix this. MyFiddler.
Note : I don't want to use tagfield.
The Combobox control is deliberately built around having only one selection. It used to support multi-select, but that's been deprecated since Ext 5.1 and will presumably vanish or break in nasty ways.
The only built-in way to do what you want is with Tag Fields (which you've indicated you don't want), or the Ext.view.MultiSelector class. The latter isn't a single field, but a variant of a grid.
I'm testing TagDragon jQuery plugin, it's exactly what I need, but is has one annoying "feature", when I click the scrollbar in the suggestion list, it hides it's results. On the other hand jQuery autocomplete plugin doesn't lose the focus on the input field and that's why it doesn't hide its results. But that plugin doesn't provide the functionality I need, so I can't just replace tagdragon.
I've studied jQuery autocomplete code and I can't understand how they keep the focus on the input field, I just can't find the code responsible for that!
So the question of the day is: How to keep the focus on the input when using the scrollbar in the result suggest list?
P.S. Also I have a question of how jQuery autocomplete plugin does it, because it looks like magic to me after studding the code for an hour.
I just asked a similar question, and nobody answered it, so I basically tweaked my own code until I figured out a working solution.
After investigating some of the other pickers out there, I realized that the trick is not to add an event that closes the list on blur, instead simulate a blur event by checking other possibilities by doing the following:
upon the opening of the list, add a click event to the document that
checks to see if the click is not on in the active input, and not on
the active list. If this is true and the click is in fact on a non-listy
part of the document, then close it.
add an event to each list item in the suggest list (when the list is
open only) that selects the value and closes the list.
add an keydown event to the input itself so if the user hits enter,
it changes the value and closes the list.