Polish debug tree output for state properties
This commit is contained in:
parent
c7f37e0c1c
commit
1d7c80f5e7
@ -18,7 +18,7 @@ public struct StateWrapper: ConvenienceWidget {
|
|||||||
/// The debug tree parameters.
|
/// The debug tree parameters.
|
||||||
public var debugTreeParameters: [(String, value: CustomStringConvertible)] {
|
public var debugTreeParameters: [(String, value: CustomStringConvertible)] {
|
||||||
[
|
[
|
||||||
("state", value: state)
|
("state", value: state.map { $0.key.dropFirst() }.joined(separator: ", "))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
import Meta
|
import Meta
|
||||||
import SampleBackends
|
import SampleBackends
|
||||||
|
|
||||||
struct DemoView: SimpleView {
|
struct DemoView: View {
|
||||||
|
|
||||||
|
@State private var test = ""
|
||||||
|
|
||||||
var view: Body {
|
var view: Body {
|
||||||
Wrapper {
|
Wrapper {
|
||||||
Backend1.TestWidget1()
|
Backend1.TestWidget1()
|
||||||
Backend1.Button("") {
|
Backend1.Button(test) {
|
||||||
|
test = "\(Int.random(in: 0...10))"
|
||||||
}
|
}
|
||||||
TestView()
|
TestView()
|
||||||
testContent
|
testContent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user