Using Editor - How do I add a control for number of records displayed in dropdown box

Using Editor - How do I add a control for number of records displayed in dropdown box

MKPMKP Posts: 2Questions: 1Answers: 0

How do I add a control for number of records displayed in dropdown box... I see examples for Datatables, but nothing editor speciffaclly.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    You can assign standard HTML attributes to the select element using the attr option of the select field type. So you could use something like:

    {
      label: 'My field:',
      name: 'myField',
      type: 'select',
      attr: {
        size: 5
      }
    }
    

    Allan

  • MKPMKP Posts: 2Questions: 1Answers: 0

    Sorry but, I was referring to displaying a drop down box to select whether to show 10 or 20 or 50 or 100 or all records/rows being displayed in the editor ... again there are answers to this for datatable, but no example for editor... and the example for datatables doesn't work.

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    The DataTables page length menu doesn't really have anything to do with Editor to be honest. It is a DataTables configuration option and can be controlled using the lengthMenu option. Remember that Editor just sits on top of a standard DataTable.

    If that doesn't work for you, can you link to the page showing the issue so I can debug it please.

    Allan

This discussion has been closed.