Topic: Set table width in ModelEditor

Hoteentot free asked 4 years ago


How can I set the table width in ModelEditor. In other tables it works. I cannot find out how to set in ModelEditor.


Mateusz Łubianka staff answered 4 years ago


@Hoteentot,

I am sorry for the misunderstanding. Unfortunately there isn't built-in scrollX option in mdb-editor code. You can set table width and use this css:

overflow-x: scroll; 

Best,


Hoteentot free commented 4 years ago

I''m sorry, don 't work. May be a additional for next version update


Mateusz Łubianka staff commented 4 years ago

You should add custom width and after that 'overflow-x: scroll; '


Mateusz Łubianka staff answered 4 years ago


You can change table width via css style or jQuery.

*CSS

.wrapper-editor {width: 300px;}

*jQuery

$('.wrapper-editor').css('width', '300px'); 

Best,


Hoteentot free commented 4 years ago

Thanks, but is not what I meant. In dtHorizontalExample you can set scrollX = true. How Can I set This in ModalEditor. When I try in ModalEditor ScrollX = true, notting happens


Hoteentot free answered 4 years ago


    <script>

$('#dtBasicExample, #dtBasicExample-1, #dt-more-columns, #dt-less-columns').mdbEditor({

  headerLength: 24,
  scrollX: true,
  scrollY: true,
  modalEditor: true
});
$('.dataTables_length').addClass('bs-select');

  </script>

Mateusz Łubianka staff commented 4 years ago

@Hoteentot,

Ok, I can see your problem. I check it and answer you soon.

Best,


Hoteentot free commented 4 years ago

Did you already find an solution for above problem?


Mateusz Łubianka staff commented 4 years ago

Do you want only to set table width? Am I right?

Best,


Hoteentot free commented 4 years ago

Yes indeed, it would be great!


Mateusz Łubianka staff answered 4 years ago


Hi @Hoteentot,

How did you try to do it? Can you sen a sample of code? I'll try to help you?

Best,


Hoteentot free commented 4 years ago

$('#dtBasicExample, #dtBasicExample-1, #dt-more-columns, #dt-less-columns').mdbEditor({ headerLength: 24, scrollX: true, scrollY: true, modalEditor: true }); $('.dataTables_length').addClass('bs-select');



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.11
  • Device: laptop
  • Browser: firefox
  • OS: windows 7
  • Provided sample code: No
  • Provided link: No