@odoo/o-spreadsheet
Version:
A spreadsheet component
60 lines (59 loc) • 1.71 kB
TypeScript
import { Component } from "@odoo/owl";
import { ValueAndLabel } from "../../types";
import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
import { Popover, PopoverProps } from "../popover/popover";
export interface SelectProps {
onChange: (value: string) => void;
values: ValueAndLabel[];
selectedValue?: string;
class?: string;
popoverClass?: string;
name?: string;
title?: string;
}
export declare class Select extends Component<SelectProps, SpreadsheetChildEnv> {
static template: string;
static props: {
onChange: FunctionConstructor;
values: ArrayConstructor;
selectedValue: {
type: StringConstructor;
optional: boolean;
};
class: {
type: StringConstructor;
optional: boolean;
};
popoverClass: {
type: StringConstructor;
optional: boolean;
};
name: {
type: StringConstructor;
optional: boolean;
};
title: {
type: StringConstructor;
optional: boolean;
};
};
static components: {
Popover: typeof Popover;
};
private selectRef;
private dropdownRef;
private state;
setup(): void;
onMouseDown(): void;
onKeyDown(ev: KeyboardEvent): void;
onExternalClick(ev: MouseEvent): void;
onOptionClick(value: string): void;
toggleDropdown(): void;
private closeDropdown;
get popoverProps(): PopoverProps;
get selectedLabel(): string;
onOptionHover(value: string): void;
get activeValue(): string | undefined;
private navigateToNextOption;
private navigateToPreviousOption;
}