Skip to content

Commit

Permalink
Fix MRU for stored procedures PK & params
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslevesque committed Oct 12, 2020
1 parent 66171b9 commit 631747a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CosmosDBStudio/View/StoredProcedureParametersView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Label Content="Partition key" FontWeight="Bold" />
<ComboBox IsEditable="True"
Margin="5,0,5,0"
d:ItemsSource="{Binding PartitionKeyMRU}"
ItemsSource="{Binding PartitionKeyMRU}"
Text="{Binding PartitionKeyRawValue, UpdateSourceTrigger=LostFocus}">
<i:Interaction.Behaviors>
<bhv:ErrorBehavior Error="{Binding Errors[PartitionKeyRawValue]}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ private async Task ExecuteAsync()
if (p.Errors.HasError)
return;

p.TryParseValue(out var value);
parameters.Add(value);
if (p.TryParseValue(out var value))
{
parameters.Add(value);
p.MRU.PushMRU(p.RawValue!, 10);
}
}

StoredProcedureResult? result;
Expand Down

0 comments on commit 631747a

Please sign in to comment.