Issue #1873Opened March 9, 2019by alialrabi1 reactions

Grid Component Resize Its cells width not works

Question

Hi artf, i have a question when i implement grid component having row and three cells , i want to make these cells resiazable on width and height , So i make an event when component selected set it resizable =true , when resize cells height it works , but the cells width not affect yet when resize it , how i can make cells resizable. this is my code :

Code SnippetTEXT
blockmanager.add('my-grid', {
    label: 'Grid',
    category: 'Basic',
    content: '<div title= "grid" class="row" style="height:50px; border-width:0px"><div class="cell"></div><div class="cell"></div><div class="cell"></div></div>',
    attributes: {class:'gjs-fonts gjs-f-b3 gjs-block gjs-one-bg gjs-four-color-h'},
    style:{
        'width': '33vw',
    }  });

and the event is  : 

      editor.on('component:selected', function (args) {
        args.attributes.resizable = true;

    });

Answers (2)

artfMarch 10, 20191 reactions

This is because the grid uses flex so you should use flex-basis for the width. In that case resizable should be an object like this { keyWidth: 'flex-basis' }

lock[bot]March 10, 20200 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.