Use block docs for better doc generation

This commit is contained in:
Piotr Jamróz
2021-08-09 12:39:35 +02:00
parent d5730a4780
commit 80e06aa439
2 changed files with 7 additions and 3 deletions
@@ -13,8 +13,10 @@ import { useStyles } from '../../themes';
export interface SegmentAsyncProps<T> extends SegmentProps<T>, Omit<HTMLProps<HTMLDivElement>, 'value' | 'onChange'> {
value?: T | SelectableValue<T>;
loadOptions: (query?: string) => Promise<Array<SelectableValue<T>>>;
// if true, options will be reloaded when user changes the value in the input,
// otherwise, options will be loaded when the segment is clicked
/**
* If true options will be reloaded when user changes the value in the input,
* otherwise, options will be loaded when the segment is clicked
*/
reloadOptionsOnChange?: boolean;
onChange: (item: SelectableValue<T>) => void;
noOptionMessageHandler?: (state: AsyncState<Array<SelectableValue<T>>>) => string;
@@ -11,7 +11,9 @@ export interface Props<T> extends Omit<HTMLProps<HTMLDivElement>, 'value' | 'onC
value?: SelectableValue<T>;
options: Array<SelectableValue<T>>;
onChange: (item: SelectableValue<T>) => void;
// if provided - AsyncSelect will be used allowing to reload options when the value in the input changes
/**
* If provided - AsyncSelect will be used allowing to reload options when the value in the input changes
*/
loadOptions?: (inputValue: string) => Promise<Array<SelectableValue<T>>>;
onClickOutside: () => void;
width: number;