Skip to content

Pass field context as third argument to matchFieldOptionValue()  #42

Description

@gr2m

Please avoid duplicates

What’s missing?

The current matchFieldOptionValue constructor options receives two arguments

function (fieldOptionValue, userValue) {
  // return true or false
}

I suggest we pass a 3rd context argument

function (fieldOptionValue, userValue, context) {
  // return true or false
}

context would look like this

{
  field: {
    name: "My Field",
    userName: "myField",
    // maybe also `type`, and `options`, but we could add that later
  }
}

That way we could add more context in future, e.g. project, which would be the current project instance.

Why?

The way options are matched might differ depending on the field

Alternatives you tried

:shrug

Would you be interested in contributing the feature?

  • yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions