goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
37 lines • 1.47 kB
TypeScript
import { default as React } from 'react';
import { DropdownOption } from '../Field/Dropdown/Regular';
export type TransferListVariant = 'singleSelection' | 'multipleSelection';
export interface TransferListDropdownDataMap {
[dropdownValue: string]: {
leftItems: string[];
rightItems: string[];
};
}
export interface TransferListProps {
variant?: TransferListVariant;
leftItems?: readonly string[];
rightItems?: readonly string[];
dropdownLabel?: string;
dropdownOptions?: DropdownOption[];
dropdownDataMap?: TransferListDropdownDataMap;
itemLabelMap?: Record<string, string>;
onChange: (leftItems: string[], rightItems: string[], dropdownValue?: string) => void;
leftTitle?: string;
rightTitle?: string;
sacredtheme?: boolean;
className?: string;
style?: React.CSSProperties;
/**
* Form-engine binding key. When inside a `<Form>` with no explicit
* `rightItems`, the assigned (right) list is read from / written to the form
* engine as the field's `string[]` value; the caller's `onChange` is always
* preserved. Outside a form, or with explicit `rightItems`, behavior is
* unchanged (back-compat).
*/
name?: string;
/** Stable test selector — emitted as `data-field-name`; defaults to `name`. */
dataFieldName?: string;
}
declare const TransferList: React.FC<TransferListProps>;
export default TransferList;
//# sourceMappingURL=index.d.ts.map