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

Add maybe-query and model-or-models helpers #176

Merged
merged 3 commits into from
May 17, 2023

Conversation

jeffdaley
Copy link
Contributor

Introduces two LinkTo-focused helpers to make the DropdownList::LinkTo component more flexible.

Example usage:

<LinkTo
    {{! fall back to an empty hash if @query is undefined }}
    @query={{maybe-query @query}}
    
    {{! fall back to an empty array if no models are provided }}
    @models={{model-or-models @model @models}}

@jeffdaley jeffdaley requested a review from a team as a code owner May 16, 2023 15:55
web/app/helpers/maybe-query.ts Outdated Show resolved Hide resolved
@jeffdaley jeffdaley merged commit 1b2e736 into main May 17, 2023
@jeffdaley jeffdaley deleted the jeffdaley/link-to-helpers branch May 17, 2023 00:52
anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
* Add and test LinkTo helpers

* Tweak types, Glint boilerplate

* Improve comment
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.

None yet

2 participants