Skip to content

Instantly share code, notes, and snippets.

@naturalwarren
Last active April 19, 2023 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naturalwarren/3f2f5729e5b64917824d77e64a39863e to your computer and use it in GitHub Desktop.
Save naturalwarren/3f2f5729e5b64917824d77e64a39863e to your computer and use it in GitHub Desktop.
DataRow+ViewModelConvertible
extension DataRow: ViewModelConvertible {
func viewModel(context: SDUIContext) -> some ViewModel {
return DataRowViewModel(
title: self.title,
titleURL: self.titleHyperlink,
subtitle: self.subtitle,
layout: self.layout.toNativeLayout(),
accessory: accessoryView?.viewModel(context: context)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment