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 field key to trigger params when using dynamic dropdowns. #117

Open
evanjarrett opened this issue Dec 2, 2019 · 2 comments
Open

Add field key to trigger params when using dynamic dropdowns. #117

evanjarrett opened this issue Dec 2, 2019 · 2 comments

Comments

@evanjarrett
Copy link

Current Behavior

Currently, triggers on dynamic dropdowns do no know what field called them. So if you have input fields generated dynamically, and you want to have the same trigger be used for all of them, you have no way of knowing what field called what trigger.

for example I have 2 fields on an object called "owner" and "company"
the Api call would be the same, but i need to pass in the field that called it.
so I can make 2 triggers ownerlist.id.name and companylist.id.name

However, our list of input fields is generated dynamically. Ie, a user may have a custom input field "pets" but we don't have a trigger made for it, because we don't know if it will exist at runtime.

Desired Behavior

I believe this request might be a duplicate of #22 but I am asking for a slightly different use-case. While custom bundle properties might be the more idea solution, I think simply passing in some argument into the trigger that tells you where it came from (input field key) we could then re-use the same logic for multiple fields without needing to make a trigger for every single one.

if our triggers knew what the field was that called them, we could support tons of additional functionality

const getRelatedData = (z, bundle, fieldKey) => {
}
@briandpeterson
Copy link

Yes, I agree this would be huge for me. Our system is metadata driven. Everything is dynamic. Entity types can be created. Every single field is custom.

I wonder how SalesForce did it? Everything in their system is meta data driven... Maybe there is a secret work-around to passing a parameter to these? I would think SalesForce would require it for theirs.

@xavdid
Copy link
Contributor

xavdid commented Feb 18, 2021

@00firestar00 @briandpeterson I've added a comment on the linked issue that may solve your problem as well: #22 (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

No branches or pull requests

3 participants