-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
looking for a way to let user define a custom field for a rule #304
Comments
I think this issue could be similar o related to #303 |
maybe, except i wanted to let the user define the key in a text input. i wound up not needing to do this, but it could be a useful feature for others. |
I am facing the same use case. Would be awesome if I could set a flag to enable this behavior. |
@erickvieira , @megantaylor if anyone any of you were able to get through this / figure this out? |
@thidasapankaja imagine if you could create a member of const arbitraryFields: Fields = {
foo: { /* Regular configuration according to docs */ },
bar: {
label: "Bar",
type: "!map", // just an example,
mapAllowedOperators: ["equity", "difference", "between"]
}
} Now, if user click on select menu's option "Bar", it will render a line with the following components in this order:
It makes sense for you guys? There are so many use cases where I could use something like this in past 2 years. It would be really awesome to finally see this implemented here. This is my main choice everytime. Ps.: I've tried to implement this once, but it's specially hard to me deal with the mutability of maps 😜 |
I assume that |
Are you talking about the raw value of the property or about the key type?
|
I'm talking about first option ( |
That is why I've suggested include the property |
I am facing the same use case too, any plan to support it? |
@ukrbublik i know you are busy on other features and bugs, but still want to confirm with you. We have strong requirement for this feature, are you going to support it? and what is plan? Thanks! |
I will prioritize this issue. |
Thanks, great news for me. 👍 |
i want to allow a user to create a rule for a custom field.
so the user experience would be something like:
click add rule
select something like "Custom" from the field select dropdown
this would generate a text input (for the custom field name), an operator dropdown, and a second text input (for the custom field value).
so the user could do something like
"custom_field" = "some value"
.desired output to jsonLogic would look something like
{"==":[{"var":"custom.custom_field"},"some value"]}
i have played with the
!group
and!struct
types but they don't quite do what i'm looking for.is there a way to do this?
The text was updated successfully, but these errors were encountered: