Skip to content

Commit

Permalink
fix: šŸ› [JIRA:IOSSDKBUG-264] No left padding for the 1st column in Datā€¦
Browse files Browse the repository at this point in the history
ā€¦aTable (#762)
  • Loading branch information
restaurantt authored Aug 6, 2024
1 parent 14eba1f commit 6d67ddd
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Sources/FioriSwiftUICore/DataTable/LayoutData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,7 @@ class LayoutData {
}

if let padding = dataCellPadding {
if columnIndex == numOfColumns - 1 {
return EdgeInsets(top: padding.top, leading: padding.leading, bottom: padding.bottom, trailing: 0)
} else {
return padding
}
return padding
}

let vPadding = isHeader ? TableViewLayout.topAndBottomPaddingsForHeader : TableViewLayout.topAndBottomPaddings
Expand All @@ -498,16 +494,8 @@ class LayoutData {
let numOfColumns = self.numberOfColumns()
if numOfColumns < 1 {
return EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0)
} else if numOfColumns == 1 {
return EdgeInsets(top: vPadding, leading: contentInset, bottom: vPadding, trailing: 0)
} else {
if columnIndex == 0 {
return EdgeInsets(top: vPadding, leading: contentInset, bottom: vPadding, trailing: contentInset)
} else if columnIndex == numOfColumns - 1 {
return EdgeInsets(top: vPadding, leading: contentInset, bottom: vPadding, trailing: 0)
} else {
return EdgeInsets(top: vPadding, leading: contentInset, bottom: vPadding, trailing: contentInset)
}
return EdgeInsets(top: vPadding, leading: contentInset, bottom: vPadding, trailing: contentInset)
}
}

Expand Down

0 comments on commit 6d67ddd

Please sign in to comment.