Skip to content

Add defaultKey support to PluginList#312

Merged
tinder-caiofonseca merged 7 commits intomainfrom
defaultkey-support-pluginlist
Feb 7, 2023
Merged

Add defaultKey support to PluginList#312
tinder-caiofonseca merged 7 commits intomainfrom
defaultkey-support-pluginlist

Conversation

@tinder-caiofonseca
Copy link
Contributor

Add support to PluginListWithDefault for overriding a defaultKey computed property for defining the KeyType value that maps to the default item in the Plugin List. This would then be utilized in create(key: KeyType, state: StateType) to return the default item instead of an item from the collection. The default item will also still be returned when an invalid key is provided to this method.

@tinder-garricnahapetian
Copy link
Contributor

Great work! Are there any more tests that should be added?

@tinder-caiofonseca
Copy link
Contributor Author

Great work! Are there any more tests that should be added?

I think we can. Let me check that!

Copy link
Contributor

@tinder-garricnahapetian tinder-garricnahapetian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding another test!

tinder-caiofonseca and others added 2 commits January 25, 2023 12:46
Co-authored-by: Garric Nahapetian <31713341+tinder-garricnahapetian@users.noreply.github.com>
tinder-cfuller
tinder-cfuller previously approved these changes Jan 30, 2023
Copy link
Contributor

@tinder-cfuller tinder-cfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Copy link
Contributor

@tinder-cfuller tinder-cfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@tinder-caiofonseca tinder-caiofonseca merged commit 419cee7 into main Feb 7, 2023
@tinder-caiofonseca tinder-caiofonseca deleted the defaultkey-support-pluginlist branch February 7, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework Framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants