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

fix: 🐛 [JIRA: IOSSDKBUG-306] toolbar layout issue #771

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

xiaoyu0722
Copy link
Contributor

@xiaoyu0722 xiaoyu0722 commented Aug 13, 2024

Use @StateObject to make sure the only true source of handler.

before after
Screenshot 2024-08-13 at 10 55 09 Screenshot 2024-08-13 at 10 54 39

Test Code

#Preview {
    TestView()
}
class TestViewModel: ObservableObject {
    @Published var isScreenLoading = false
}
struct TestView: View {
    @StateObject var viewModel = TestViewModel()
    var body: some View {
        NavigationStack {
            Text("Hello world.")
                .fioriToolbar {
                    FioriButton { _ in
                        self.viewModel.isScreenLoading = true
                    } label: { _ in
                        Text("Change value")
                            .frame(maxWidth: .infinity)
                    }
                }
        }
    }
}

@xiaoyu0722 xiaoyu0722 requested a review from a team as a code owner August 13, 2024 02:59
@xiaoyu0722 xiaoyu0722 requested review from billzhou0223 and removed request for a team August 13, 2024 02:59
@billzhou0223 billzhou0223 merged commit 295201e into SAP:main Aug 13, 2024
12 checks passed
dyongxu added a commit that referenced this pull request Aug 16, 2024
… other fixes (#776)

* chore(release): 4.1.2

* fix: 🐛 [IOSSDKBUG-291] set line limit for MenuSelectionItem (#769)

* fix: 🐛 [JIRA: IOSSDKBUG-306] toolbar layout issue (#771)

* feat: 🎸 [JIRA:HCPSDKFIORIUIKIT-2686] Button update (#753)

Co-authored-by: Bill Zhou <bill.zhou01@sap.com>

* fix: 🐛 step progress indicator styles (#775)

* Translation Delivery (#774)

* [INTERNAL] Translation delivery: commit by LX Lab

Change-Id: I111a249ae01afea6ba8029630027e1807e471499

* [INTERNAL] Translation delivery: commit by LX Lab

Change-Id: I00c59b0e7a3bcd6346b6fddb8a51787bc132ace4

---------

Co-authored-by: dyongxu <61523257+dyongxu@users.noreply.github.com>

---------

Co-authored-by: Marco Eidinger <marco.eidinger@sap.com>
Co-authored-by: Bill Zhou <bill.zhou01@sap.com>
Co-authored-by: Xiaoyu Liu <xiaoyuliu0722@gmail.com>
Co-authored-by: hengyi-zhang <hengyizhangcn@gmail.com>
Co-authored-by: SAP LX Lab Service Account <tmsatsls+github.com_service-tip-git@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants