-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Allow null values in table #1616
Comments
I am happy to send in a pull request, just let me know if you want this feature in the component! |
Sorry, but why would you create a Markup with a null value? The contract says it accepts a Unless you've turned off nullable reference types, you should get a warning when passing something that might be null. I would recommend doing a |
I'm passing quite values I am adding like AddRow(Contact?.Firstname, ....); it would be convenient not to care about null or not null. |
Is your feature request related to a problem? Please describe.
Currently, Spectre.Console throws an exception if one passes a null value for a table cell value:
spectre.console/src/Spectre.Console/Internal/Text/Markup/MarkupParser.cs
Line 7 in 2cc6c45
Describe the solution you'd like
I propose to get rid of the exception and just assume an empty value (or 'NULL' as an alternative). At least in my environment, I am using Spectre.Console for internal output and am wondering how I would deal with eventual exceptions in my code. Passing a null value is nothing that imho is exceptional, it is just one possible value.
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: