-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adds Filter switch #110
Adds Filter switch #110
Conversation
Co-Authored-By: Tyler James Leonhardt <[email protected]>
@@ -47,6 +47,8 @@ public HashSet<int> Start(ApplicationData applicationData) | |||
LoadData(); | |||
AddRows(win); | |||
|
|||
_filterField.Text = _applicationData.Filter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the code more robust, you should handle when Filter is null here instead of setting the default value to empty string in the other file for Filter.
You can do a simple:
_applicationData.Filter ?? string.Empty
And then remove the default value in the cmdlet
@@ -11,6 +11,7 @@ public class ApplicationData | |||
public string Title { get; set; } | |||
public OutputModeOption OutputMode { get; set; } | |||
public bool PassThru { get; set; } | |||
public string Filter { get;set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string Filter { get;set; } | |
public string Filter { get; set; } |
@@ -47,6 +47,8 @@ public HashSet<int> Start(ApplicationData applicationData) | |||
LoadData(); | |||
AddRows(win); | |||
|
|||
_filterField.Text = _applicationData.Filter; | |||
_filterField.CursorPosition = _applicationData.Filter.Length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then use
_filterField.CursorPosition = _applicationData.Filter.Length; | |
_filterField.CursorPosition = _filterField.Text.Length; |
Good feedback. Thanks. Should be good to go now. |
@tig can you also update the markdown doc for ocgv? |
You may want to run that BuildCmdletHelp task locally to debug the CI issue. Looks like you have a missing heading or something. |
Last thing, I promise. If you rev the version in the psd1 to 0.6.0 and add a section in the psd1 changelog, I can merge this in and snap a release :) |
Wha? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR address #109 by adding a
-Filter
switch toocgv
.