Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Inline Cell Visibility Animation After Expansion Conditional #1195

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/Core/Core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ public struct InlineRowHideOptions: OptionSet {
open class FormViewController: UIViewController, FormViewControllerProtocol, FormDelegate {

@IBOutlet public var tableView: UITableView!

/// Whether expanded inline rows should be made visible automatically. Defaults to `true`.
open var isInlineRowsMadeVisibleOnExpansion: Bool = true

private lazy var _form: Form = { [weak self] in
let form = Form()
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/InlineRowType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ extension InlineRowType where Self: BaseRow, Self.Cell.Value == Self.InlineRow.
if let indexPath = indexPath {
_inlineRow = inline
section.insert(inline, at: indexPath.row + 1)
cell.formViewController()?.makeRowVisible(inline, destinationScrollPosition: destinationScrollPosition)
if cell.formViewController()?.isInlineRowsMadeVisibleOnExpansion == true {
cell.formViewController()?.makeRowVisible(inline, destinationScrollPosition: destinationScrollPosition)
}
}
}
}
Expand Down