SalesforceLabs / EnhancedLightningGrid

Component that allows you to sort and filter data within the Lightning Experience. Use as a replacement for a Related List, or create a new grid that shows results from a custom query.
BSD 3-Clause "New" or "Revised" License
136 stars 96 forks source link

Wrap & Clip text options missing #6

Open romcode opened 6 years ago

romcode commented 6 years ago

Hi, it seems is not possible to wrap (or clip) the text of each column, as lighting tables do (see attached image)

It would be great if this is an option for the end user (drop menu in each column, as lighting standard) and also an option for each field configuration "predefined" mode.

Please, note that for the "clip" text option, a "tooltip" of uncutted text would be great. This is something that salesforce does not have at all in any table, but maybe is not so complicate in your component inside the sdgDatagridCell.cmp sub-component.

Best regards and thank you for your great effort!!!

image

cgrinter commented 5 years ago

love this app! agreed this would be awesome for longer text fields to have word wrap or clip options enabled

sbaar commented 5 years ago

This is actually critical for us as one of the fields is a huge long link, and when putting it in the right side of a lightning record page (below where activity history is), every other field is not viewable unless scrolling way to the right.

justinclarke-sc commented 4 years ago

In case this is helpful, a workaround we did was 1) Use an apex-based data source rather than the sortable data grid, and 2) Apply CSS to the data that is returned and displayed by the Enhanced LightningGrid

If you haven't experimented with using apex as a data source yet, I can't quite help with that part - but if you have, here's a code example that worked for us:

// query the data
result.data = (List<yourObjectType>) database.query(query);

// data manipulation
for (SObject o : result.data) {
    yourObjectType r = (yourObjectType) o;

    // apply word wrapping
    if (r.Description != null) {
        r.Description = '<div style=\'word-wrap: normal; white-space: normal !important;\'>' + r.Description + '</div>';
    }
}
danm4m commented 2 years ago

Are there any plans to address this or workarounds without using apex?