Our blazing fast Grid component built with pure JavaScript


Post by fcoca »

Hi,

As per documentation the ActionColumn has a rendered config at column level that is not working.

Docu: https://www.bryntum.com/docs/grid/api/Grid/column/ActionColumn#config-renderer

Demo: https://codepen.io/javicloud/pen/LYjrKRg

Please have a look.

Thanks and Regards
Javi


Post by mats »

It's not meant to be used currently (just a documentation bug that it shows up). The action column renders action items into the cell always, what is your use case for wanting to use the renderer in this column?


Post by fcoca »

Hi Mats,

We are wiling to update the cell background when no actions are displayed based on the visibility config.

In addition to not showing actions, we want to provide some feedback to the users using the column renderer.

Regards
Javi


Post by saki »

One possibility would be to extend the action column, implement renderer and call the parent renderer. This could be a starting point:

class MyActionColumn extends ActionColumn {

    static get type() {
        return 'myaction';
    }

    renderer({ record, column }) {
        column.cellCss = 'my-css-class'; // your logic here
        super.renderer(...arguments);
    }
};
ColumnStore.registerColumnType(MyActionColumn);
MyActionColumn.exposeProperties();

Then you would use myaction column type instead of action.


Post by fcoca »

Thanks for your response and sorry for not coming back to you before.

The only requirement is to conditionally style the ActionColumn cell.

In this example https://codepen.io/javicloud/pen/rNGmjEO?editors=0010 you can see the expected behavior.

The only alternative we have is to create a new custom column?

Regards
Javi


Post by mats »

We'll get this fixed for the next release, it's a very reasonable use case: https://github.com/bryntum/support/issues/3912


Post by fcoca »

Thanks! appreciate it!


Post by esegura »

Hi, how can we style a https://www.bryntum.com/docs/grid/api/Grid/column/ActionColumn to replicate the cell edit error look and feel? We tried do that using renderer function and setting the style class b-invalid but not working
Thanks


Post by mats »

Action column is quite not meant to be made to look invalid (as it's not editable), it's meant to show a few clickable actions... How do you use it?


Post by esegura »

We have one action which opens a modal window where the data is edited, if there are missing data we need to mark the cell with error.


Post Reply