Hi All, Does anyone have any suggestions on how I could make the columns in a DG2 less wide when there is a filter set in the column filter section? Say for example I have an attribute called SequenceNumber (integer). I can set the column width for the data in the columns appearance tab to auto-fit content and it will try to make is less wide. However, if I have a number filter (this also happens with the other filters) then the column will stay wider than needed as the DG2 seems to try to set the width based on what the minimum it thinks the filter widget needs, and ignores the column width needs of the data in the column. I'd like to make the column less wide. I can do that by removing the filter widget, but I want to use that too, just not that it then results in a much to wide column.
asked
Ron de Vries
3 answers
1
To follow up on the above answer, I did something similar using scss styling on the filter widget. I think you can put this in the "style" box at the bottom of the filter widget properties tab. Play around with the px value to what you want. I think you need the ; at the end as well.
max-width: 100px;
I hope this helps. I am new to this and got this answer from another forum regarding galleries. Someone please correct me or add to this if I am wrong.
answered
Kendall Silva
1
You can set max-width for the filter element in styling property
answered
Tuan Phan Anh
0
Does anyone @mendix know if we're also getting an autofit-content option for the filters in DG2 sometime soon, or at least something where the filters automatically follow the width that is calculated for the data columns in DG2 when we set a column to autofit-content? (the latter is my preference, less work and more intuitive).
I'll also ask in the Mendix Slack Community Feedback channel.