Giter Club home page Giter Club logo

select-dropdown-handsontable-extension's Introduction

select-dropdown-handsontable-extension

A select dropdown that accepts value-text pair.

This works best with Handsontable 0.12 version.

Suppose the data source is something like:

    [
      { id: 1, role: 'IT', Employee { id: 222, SSN: 344-23-0000 }, code: 3333  },
      { id: 2, role: 'Sales', Employee { id: 333, SSN: 344-23-0001 }, code: 4444  },
      { id: 3, role: 'IT Manager', Employee { id: 444, SSN: 344-23-0002 }, code: 5555  },
      { id: 4, role: 'Security', Employee { id: 555, SSN: 344-23-0004 }, code: 6666  }

    ]

Example column schema for a selectDropdown type column:

        { 
          title: "Employee Name"  ,
          data: 'employee.id', /* the key you want the selection to happen on.*/
          type: "selectDropdown",  /* this is the new type provided by this extension */ 
          selectOptions: dropdownLists.employeesList, /* The dropdown list as is */
          valueField: "EmployeeId", /* the field in data.employeesList that we get the option value from */
          textField: "EmployeeName",  /* the field in data.employeesList that we get the option text from */
          allowNull: true, /* if set to true, it will add an empty option to select from */
          width: 310
        }

Where dropdownLists.employeesList would be something like:

dropdownLists.employeesList = [
  { EmployeeId: 1, EmployeeName: 'David', SSN: 123-45-6789  },
  { EmployeeId: 2, EmployeeName: 'Jorge', SSN: 133-45-6789  },
  { EmployeeId: 3, EmployeeName: 'Alex', SSN: 153-45-6789  },
  { EmployeeId: 4, EmployeeName: 'Chelsea', SSN: 163-45-6789  },
  { EmployeeId: 5, EmployeeName: 'Sean', SSN: 173-45-6789  },
]

select-dropdown-handsontable-extension's People

Contributors

david-saadeh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.