Select cell type
Use the select cell type to collect user input with an HTML <select> element that creates a multi-item dropdown list.
Overview
The select cell type is a simpler form of the dropdown cell type.
Usage
The select editor should be considered an example of how to write editors rather than used as a fully-featured editor. It is a much simpler form of the Dropdown editor. We recommend that you use the latter in your projects.
import { HotTable } from '@handsontable/react-wrapper';import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modulesregisterAllModules();
const ExampleComponent = () => { return ( <HotTable data={[ ['2017', 'Honda', 10], ['2018', 'Toyota', 20], ['2019', 'Nissan', 30], ]} colWidths={[50, 70, 50]} colHeaders={true} columns={[ {}, { type: 'select', selectOptions: ['Kia', 'Nissan', 'Toyota', 'Honda'], }, {}, ]} autoWrapRow={true} autoWrapCol={true} height="auto" licenseKey="non-commercial-and-evaluation" /> );};
export default ExampleComponent;import { HotTable } from '@handsontable/react-wrapper';import { registerAllModules } from 'handsontable/registry';
// register Handsontable's modulesregisterAllModules();
const ExampleComponent = () => { return ( <HotTable data={[ ['2017', 'Honda', 10], ['2018', 'Toyota', 20], ['2019', 'Nissan', 30], ]} colWidths={[50, 70, 50]} colHeaders={true} columns={[ {}, { type: 'select', selectOptions: ['Kia', 'Nissan', 'Toyota', 'Honda'], }, {}, ]} autoWrapRow={true} autoWrapCol={true} height="auto" licenseKey="non-commercial-and-evaluation" /> );};
export default ExampleComponent;Related articles
Related guides
Configuration options
Core methods
Hooks