cancel
Showing results for 
Search instead for 
Did you mean: 

Table display Error with Checkbox

Former Member
0 Kudos

Dear community,

when I add a Checkbox into my ColumnList the height of the cells moved and the checkbox is to low.

<Table

            headerText="{i18n>LineItemTableHeader}"

            mode="SingleSelectLeft"

            items="{MasterModel>time_trackings/?$expand=contract,employee}" >

            <columns>

                <Column>

                    <header><Label text="LST Date" /></header>

                </Column>

                <Column

                    minScreenWidth="Tablet"

                    demandPopin="true"

                    hAlign="Left" >

                    <header><Label text="Description" /></header>

                </Column>

                <Column

                    minScreenWidth="Tablet"

                    demandPopin="true"

                    hAlign="Center" >

                    <header><Label text="Hours" /></header>

                </Column>

                <Column

                    hAlign="Center" >

                    <header><Label text="Consultant" /></header>

                </Column>

                <Column

                    hAlign="Center" >

                    <header><Label text="Commited" /></header>

                </Column>

            </columns>

            <ColumnListItem

                type="Navigation"

                press="handleLineItemPress" >

                <cells>

                    <ObjectIdentifier

                        title="{MasterModel>LST_DATE}" />

                    <Text

                        text="{MasterModel>DESCRIPTION}"/>

                    <Text

                        text="{MasterModel>RE_STUNDEN}"/>

                    <Text

                        text="{MasterModel>employee/EMPLOYEE_SHORT}"/>

                    <CheckBox selected="{

                        path: 'MasterModel>COMMITTED'

                        }" />

                </cells>

            </ColumnListItem>

        </Table>

How can I fix it and how can i customize the cell height?

Regards,

Marcel

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Marcel,

Will this sample help? Plunker

Regards,

Sai.

former_member182862
Active Contributor
0 Kudos

Hi All

it can be done with css like this

JS Bin - Collaborative JavaScript Debugging

more efficient and no javascript involved.

Thanks

-D

Answers (1)

Answers (1)

D_Chia
Active Participant
0 Kudos

i would propose just set the vertical alignment of the cells of the table row by default :-

<ColumnListItem

            type="Navigation"

            press="handleLineItemPress"

            vAlign="Middle">


this avoids interfering with the ContentDensity (Cozy vs Compact) responsiveness behaviour of SAPUI5. (as sap.m.Table is a responsive control)