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

[ListItem] make modifier inputs optional #1994

Merged

Conversation

alexanderboswell
Copy link
Contributor

@alexanderboswell alexanderboswell commented Apr 8, 2024

Platforms Impacted

  • iOS

Description of changes

When using the ListItem modifiers for line limit, it is extending the modifier provided by swiftui which sets the value defaulted to nil. By having the value be nil, the ListItem will grow in number of lines to show all the content provided for title/subtitle/footer.

When using these modifiers though, we have to optionally add them potentially. To support a ListItem providing a line limit for title / subtitle / footer optionally, we have to be allowed to pass in an optional value.

Binary change

N/A

Verification

It builds with the input values allowed to be optional. In the Demo app also set the values explicitly to nil and to a value. Saw the UI respected the values.

Microsoft Reviewers: Open in CodeFlow

@alexanderboswell alexanderboswell requested a review from a team as a code owner April 8, 2024 22:52
@alexanderboswell alexanderboswell enabled auto-merge (squash) April 8, 2024 22:52
@alexanderboswell alexanderboswell merged commit 07cd718 into microsoft:main Apr 8, 2024
7 checks passed
@alexanderboswell alexanderboswell deleted the user/alboswel/fixModifiers branch April 9, 2024 03:49
@alexanderboswell alexanderboswell mentioned this pull request Apr 9, 2024
12 tasks
@joannaquu joannaquu mentioned this pull request May 23, 2024
12 tasks
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