mistic100 / mistic100/jQuery-QueryBuilder

Use `values` instead of `value` when having multiple values

Open
#475 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
JavaScript
Stars
1.7k
Forks
544
PR merge metrics
No merged PRs in 30d

Description

Thank you for this awesome package.

I noticed that the getRules() function return the user's selected in a property called value. Value is a string in most time, unless between or multiple select is used then it is changed to an array.

If there a way to override the default behavior so that if the values are array of strings, then put them in a new property called values while if the property is a single string it can stay in the value property. This will make parsing the object easier with c# or ASP.NET MVC framework.

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the getRules() implementation and its tests, then inspect how it represents between and multiple-select rules. Confirm the expected output for array values and single-string values before making a change. Done means array values are exposed through values while single strings remain under value, with tests covering both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.