How to execute javascript from html snippet after a microflow?

0
I have a datagrid which has the default button set to call a microflow. So clicking on a row executes the microflow (which then does other things). Now I put a html snippet under the datagrid and included some javascript code that makes a row bold when clicked on it. Unfortunately the javascript code gets executed first and then the microflow when clicking on a row. How I can make it the other way around? Click on row in datagrid -> microflow is called -> javascript code inside the html snippet is executed. One of the things the microflow does is it changes a boolean attribute of the table entity and the javascript code of the html snippet then makes a row bold if this attribute is changed. That’s why I need the microflow to be called first and then the javascript code. Using a nanoflow where the microflow is called first and then the javascript code is not possible because calling a nanoflow from a grid action button is not yet supported. Any help is appreciated.
asked
2 answers
0

It's possible to reload the snippet, but you will need to put the snippet inside a dataview with a helper object and refresh that parent dataview in the client at the end of the microflow action behind the button. The dataview refresh will cause the snippet to be reloaded. 

A better option would be to try grid cell styler, have a look here

answered
0

Hi Alexander,

 

If I understand correctly you want to make the font of a selected row in a datagrid bold. A way to obtain this result is using sass/css. _datagrids.scss contains styling on selected table row which you can modify 

    // Table body
    tbody {
    
      // Table row
      tr {
        // Striping
        &:nth-child(even) td {
          background-color: $grid-bg-striped;
        }

        // Hover styling
        &:hover td {
          background-color: $grid-bg-hover !important;
        }

        // Selected + hover styling
        &.selected:hover td {
            background-color: $grid-bg-selected-hover !important;
            font-weight: bold; //Added by yourself
        }

A good practice is not ATLASUI components themselves but setup specific styling for the app  and copy  the _datagrids.scss from the <project>\theme\styles\web\sass\core\widgets directory to <project>\theme\styles\web\sass\app\components. Gulp or Calipso can be used.

 

answered