Editor cell width increases drastically when editing in inline mode. Why ?

Editor cell width increases drastically when editing in inline mode. Why ?

com6temcom6tem Posts: 11Questions: 4Answers: 0

Hi everyone,
I have a simple datatable with editor features. Very basic.
I use the inline mode.
However when I click a cell to edit it, the width of that cell increases a lot, which is not pretty at all.
As soon as I leave it (submit on blur), then the cell gets back its original width.

Why do this happen ?
And why at the same time it works so well in the example datatable shown in the the website here: https://editor.datatables.net/examples/inline-editing/simple.html ?

Thanks a lot!

Answers

  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin

    Have you included the Editor CSS on your page? My guess is that the input element is showing at the default width for an input element.

    Allan

  • com6temcom6tem Posts: 11Questions: 4Answers: 0
    edited June 2018

    Hi Allan,
    I have made my own package through the download builder (Bootstrap 4 styling, Datatables, Editor, Select, Buttons...).
    Then I included path to css and js files at the root of the downloaded folder:

    <link rel="stylesheet" type="text/css" href="/public/DataTables/datatables.min.css"/>
    <script type="text/javascript" src="/public/DataTables/datatables.min.js"></script>
    

    That's all...
    Is it OK ?

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • com6temcom6tem Posts: 11Questions: 4Answers: 0

    Oops, the link to datatables.min.js file was automatically removed from my previous comment... but please consider that I also a link to this file.

  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin

    Yes that looks fine. Perhaps there is another style on the page focusing the input width? Right click and "Inspect" should help identify if that is the case.

    If you can give me a link to the page you are working on I can take a look.

    Allan

This discussion has been closed.