Automatically match the drop-down selection items based on input Chinese in the drop-down

Automatically match the drop-down selection items based on input Chinese in the drop-down

lancwplancwp Posts: 85Questions: 18Answers: 1

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
How do I automatically match the drop-down selection items based on input Chinese in the new record form drop-down list in the editor? It can be automatically matched when entering English

This question has accepted answers - jump to:

Answers

  • lancwplancwp Posts: 85Questions: 18Answers: 1
    edited October 2023

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Hi,

    I'm not quite following the question I'm afraid. Do you mean how to show Chinese characters in a select dropdown like in this example? If so, you would just have the label value for the field's options be the characters you want to display.

    Allan

  • lancwplancwp Posts: 85Questions: 18Answers: 1

    Because there are many Chinese options in the drop-down list box, if the mouse selection is time-consuming, you want to directly match the corresponding drop-down selection from the keyboard in the drop-down box

  • lancwplancwp Posts: 85Questions: 18Answers: 1

    It is the drop-down list box mentioned by ALAN in the previous example. This list box can only automatically match the input of English letters and select the corresponding drop-down box. When inputting Chinese, it will not automatically match

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    You mean the value of the dropdown is not correctly selected for the row being edited? If that is the case then the value parameter of the option doesn't match the value of the data point being edited.

    I'd need a link to a page showing the issue to say much more than that (i.e. what variables are wrong).

    Allan

  • lancwplancwp Posts: 85Questions: 18Answers: 1

    The meaning is that when creating a new form, if there is a drop-down list box in the form, it will take a lot of time to select with the mouse when there are many options to choose from. Therefore, you want to directly use the keyboard to select. When the drop-down items are all in English, if the input content is selectable, but if the drop-down items are in Chinese, it cannot be automatically selected

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794
    edited October 2023 Answer ✓

    Therefore, you want to directly use the keyboard to select.

    EDIT: Updating my incorrect response:

    Are you looking for something like the Select2 and Selectize which have a dedicated input for text entry. You can try either of these by using the appropriate plugin found at the Field Type plugins page.

    but if the drop-down items are in Chinese, it cannot be automatically selected

    As Allan stated he will need a test case to see this issue. If you can't link to one maybe you can create a simple test case showing the issue with this Editor template:
    https://live.datatables.net/guwafemu/374/edit

    Kevin

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Answer ✓

    It is possible with a standard select to type the characters that you want to jump to an entry for. For example I frequently use ``Unit` to jump to "United Kingdom" in a country select list. Is that the sort of thing you mean?

    If that doesn't work with Chinese characters, that is something in the browser, not DataTables and presumably happens with all select lists.

    Allan

  • lancwplancwp Posts: 85Questions: 18Answers: 1

    Thank you for everyone's reply. It's already done

Sign In or Register to comment.