We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 986617e commit 9ca08c6Copy full SHA for 9ca08c6
Sources/STTextViewSwiftUIAppKit/TextView.swift
@@ -121,6 +121,12 @@ private struct TextViewRepresentable: NSViewRepresentable {
121
122
return scrollView
123
}
124
+
125
+ func sizeThatFits(_ proposal: ProposedViewSize, nsView: NSScrollView, context: Context) -> CGSize? {
126
+ let width = proposal.width ?? nsView.frame.size.width
127
+ let height = proposal.height ?? nsView.frame.size.height
128
+ return CGSize(width: width, height: height)
129
+ }
130
131
func updateNSView(_ scrollView: NSScrollView, context: Context) {
132
let textView = scrollView.documentView as! STTextView
0 commit comments