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

Dropdown select filter #12

Open
jsmccrumb opened this issue Jan 6, 2017 · 0 comments
Open

Dropdown select filter #12

jsmccrumb opened this issue Jan 6, 2017 · 0 comments

Comments

@jsmccrumb
Copy link

jsmccrumb commented Jan 6, 2017

It would be nice to give a predefined list of values for a filter. For example, if the data that was being queried only had X options for a field, would be nice to show all of them and let the user select the one they wanted. Would use less screen space than a normal list of say 10 options, though would be limited to only one option?

Perhaps:

{ type: "selectList", id: "myID", label: "Birthmonth", list: [
  {id: "jan", label: "January"},
  {id: "feb", label: "February"},
  {id: "mar", label: "March"},
  {id: "apr", label: "April"},
  {id: "may", label: "May"},
  {id: "jun", label: "June"},
  {id: "jul", label: "July"},
  {id: "aug", label: "August"},
  {id: "sep", label: "September"},
  {id: "oct", label: "October"},
  {id: "nov", label: "November"},
  {id: "dec", label: "December"}
]}

and then:

case fTypes.selectList:
  var arrayLength = this._field.list.length;
  h+='<select id="value">'+EvoUI.optNull;
  for (var i = 0; i < arrayLength; i++) {
    h+=EvoUI.inputOption(this._field.list[i].id, this._field.list[i].label);
  }
  h+='</select>';
  break;

just a rough sketch of a possible way?

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

No branches or pull requests

2 participants