Automatically displays the option

extend display windows 10
how do i display different things on two monitors
windows 10 dual monitor not working
windows 10 dual monitor taskbar
how to change monitor 1 to monitor 2 windows 10
windows 10 does not detect second monitor
dual monitor setup windows 7
how to setup dual monitors

I have this table, where I show a select with options but when clicking this it does not display the list right away. I have to click the input and then the list show.

How can I automatically show the list with just one click? Im using x-editable

$('#table').editable({
        container: 'body',
        selector: 'td.task',
        title: 'task',
        type: "POST",
        showbuttons: false,
         type: 'text',
        validate: function(value) {
            if ($.trim(value) == '') {
                return 'Empty!';
            }
        },  
        success: function(response) {
    
           $(this).parent().find(".Item").click();
        }
    });
    var ITEM = [];
    $.each({
        "Item1": "Item1",
        "Item2": "Item2",
        "Item3": "Item3",
        "Item4": "Item4"
    }, function(k, v) {
        ITEM.push({
            value: k,
            text: v
        });
    });
    
    $('#table').editable({
        container: 'body',
        selector: 'td.Item',
        title: 'Item',
        type: "POST",
        source: ITEM,
          select2: {
            width: 300,
            placeholder: 'Item',
            allowClear: true
            },
        validate: function(value) {
            if ($.trim(value) == '') {
                return 'Empty!';
            }
        }
    });
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> 
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>

<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.full.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>

<table id="table" class="table table-bordered">
  <thead>
    <tr>
      <th>Id</th>
      <th>Task</th>
      <th>Item</th>
    </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td data-name="task" class="task" data-type="text">001</td>
  <td data-name="Item" class="Item" data-type="select2">Item2</td>
  </tr>
    <tr>
  <td>2</td>
  <td data-name="task" class="task" data-type="text">002</td>
  <td data-name="Item" class="Item" data-type="select2">Item1</td>
  </tr>
  </tbody>
</table>

From my understanding, you need to add the data-value attribute, I believe there is no other way.

$('#table').editable({
        container: 'body',
        selector: 'td.task',
        title: 'task',
        type: "POST",
        showbuttons: false,
         type: 'text',
        validate: function(value) {
            if ($.trim(value) == '') {
                return 'Empty!';
            }
        },  
        success: function(response) {
    
           $(this).parent().find(".Item").click();
        }
    });
    var ITEM = [];
    $.each({
        "Item1": "Item1",
        "Item2": "Item2",
        "Item3": "Item3",
        "Item4": "Item4"
    }, function(k, v) {
        ITEM.push({
            value: k,
            text: v
        });
    });
    
    $('#table').editable({
        container: 'body',
        selector: 'td.Item',
        title: 'Item',
        type: "POST",
        showbuttons: false,
        source: ITEM,
        validate: function(value) {
            if ($.trim(value) == '') {
                return 'Empty!';
            }
        }
    });
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> 
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>

<table id="table" class="table table-bordered">
  <thead>
    <tr>
      <th>Id</th>
      <th>Task</th>
      <th>Item</th>
    </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td data-name="task" class="task" data-type="text">001</td>
  <td data-name="Item" class="Item" data-type="select" data-value="Item2">Item2</td>
  </tr>
    <tr>
  <td>2</td>
  <td data-name="task" class="task" data-type="text">002</td>
  <td data-name="Item" class="Item" data-type="select" data-value="Item1">Item1</td>
  </tr>
  </tbody>
</table>

Change Display preferences on Mac, Option. Description. Resolution. The amount of detail your display shows. Select “​Default for display” to automatically use the best resolution for the display,  Show Paste Options buttons Select to have Excel automatically display a dialog box with special options when you paste, such as Formatting Only and Link Cells. Show Insert Options buttons Select to have Excel automatically display a dialog box with special options when you insert cells, rows or columns, such as Formatting Same As Above and Clear Formatting .

You can either create your own data-type: example.

Or another thing you can do, which does not show the list right away, but is less cumbersome: make the select inline. Change the editable for the select datatypes to this:

$('#table').editable({
    container: 'body',
    selector: 'td.Item',
    title: 'Item',
    type: "POST",
    mode: 'inline',
    showbuttons: false,
    source: ITEM,
    validate: function(value) {
        if ($.trim(value) == '') {
            return 'Empty!';
        }
    }
});

Added mode:'inline'

Change Displays Options preferences on Mac, On your Mac, use the Options pane of Displays System Preferences to set what happens when you press the power button on your display and the brightness  To find the screen resolution setting in Windows 10, 8, or 7, select Change display settings from the left side of the screen. If you're on Windows 10, also select the Advanced display settings link. Windows Vista users need to use the Display Settings option, while Windows XP users, go to the Settings tab of Display Properties.

There's an issue with the select2 version 4, stating we cannot use input tags anymore.

  1. http://github.com/select2/select2/issues/3057
  2. https://github.com/vitalets/x-editable/issues/979

It is recommended to use a <select> element, documentation for reference.

Another link might be helpful for you

Advanced options - Excel - Office support, Automatically insert a decimal point Select this check box to display a number with decimal points by default. Places Enter the number of decimal places in the  How to show dropdown expanded automatically so that it displays all the options when page loaded. Ask Question Is the JAVASCRIPT Function that expands automatically.

There is an issue with select2.min.js in version 4. So , You needd to replace bellow link

<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>

with

<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.full.js"></script>

Canon EOS Rebel T7/2000D For Dummies, Shutter/DISP: The display turns off when you press the shutter button halfway very first time, it automatically displays this option and asks you to set the date,  3.) When the displays are duplicated, Windows automatically selects the resolution used according to the max resolution of the smaller display; in Duplicate mode the resolution on all displays must and will be the same!

Word Options (Display) - Word - Office support, Page display options. Show white space between pages in Print Layout view Select this option to display the top and bottom margins of the page, including the​  To choose the display layout for a room with one screen: Start or join a meeting. Tap the Change View control. A popup shows the options for the display. Tap the icon with the view you want to display. In this example, if you tap Speaker, the Speaker View displays.

Windows 7 Bible, The General tab displays the options shown in Figure 18-47. Automatically Display Folders with Unread Messages: If you use message rules to automatically  At the insertion point, Visual Basic displays information that logically completes a statement. Auto Quick Info: Information about functions and their arguments is displayed as you type. Auto Data Tips: Automatically display the value of any variable on which you place the mouse pointer. Available only in break mode.

How best to change your display settings in Windows 10, Fix blurry apps. Windows 10 has had a scaling option that can increase the size of fonts and icons on high-resolution displays so you can read  I did see the message in hte Dashboard that this setting is now handled in the customizer. It was already set to “Display Categories” so I toggled it to “Display Categories and Products” which does work, then I tried to toggle back to “Display Categories” but it still won’t work. In fact the page displays a message that says “”.

Comments
  • Thanks I didnt noticed