| 1234567891011121314151617181920212223242526272829 |
- import AutocompleteEditor from './autocompleteEditor';
- import Hooks from './../pluginHooks';
- /**
- * @private
- * @editor DropdownEditor
- * @class DropdownEditor
- * @dependencies AutocompleteEditor
- */
- class DropdownEditor extends AutocompleteEditor {
- prepare(row, col, prop, td, originalValue, cellProperties) {
- super.prepare(row, col, prop, td, originalValue, cellProperties);
- this.cellProperties.filter = false;
- this.cellProperties.strict = true;
- }
- }
- Hooks.getSingleton().add('beforeValidate', function(value, row, col, source) {
- let cellMeta = this.getCellMeta(row, this.propToCol(col));
- if (cellMeta.editor === DropdownEditor) {
- if (cellMeta.strict === void 0) {
- cellMeta.filter = false;
- cellMeta.strict = true;
- }
- }
- });
- export default DropdownEditor;
|