Page 1 of 1

Layout of RadioButtons within a TreeTable

Posted: 11 Jun 2017, 12:21
by pgathercole
I have a form which mainly consists of a treeTable which contains a number of different input components which all behave as expected except for the selectOneRadios which lay themselves out with very strange and confusing spacing as the label of each button seems to be right aligned as if it were the label for the next button. Even though there is a large space between each radio button and its label, this is never used and the label will often be truncated.

I hope I'm not missing something really obvious but I've tried every formatting option I can think of and nothing restores the standard and obvious layout for radio buttons.

If I use selectOneRadio outside of a treeTable then is the layout is controllable as I would expect but as a leaf in the treeTable nothing seems to have any effect.

Re: Layout of RadioButtons within a TreeTable

Posted: 13 Jun 2017, 08:22
by aragorn
Please try;

Code: Select all

<style type="text/css">
    .ui-treetable.ui-treetable-resizable table.ui-selectoneradio {
        table-layout: auto;
    }

    .ui-treetable.ui-treetable-resizable table.ui-selectoneradio tbody tr > td {
        padding: 0px;
    }
</style>
Fixed for next version; https://github.com/primefaces/layouts/issues/143

Re: Layout of RadioButtons within a TreeTable

Posted: 14 Jun 2017, 11:01
by pgathercole
Thanks very much - that does exactly what I was trying to do.

Re: Layout of RadioButtons within a TreeTable

Posted: 14 Jun 2017, 15:30
by aragorn
Glad to hear, thanks for the update!