mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-11-15 17:21:38 +03:00
B: Keep select components managed
This commit is contained in:
parent
6cf794f13b
commit
cbb36a4c32
|
|
@ -27,7 +27,7 @@ export function SelectPagination<TData>({ id, table, paginationOptions, onChange
|
|||
);
|
||||
|
||||
return (
|
||||
<Select onValueChange={handlePaginationOptionsChange} defaultValue={String(table.getState().pagination.pageSize)}>
|
||||
<Select onValueChange={handlePaginationOptionsChange} value={String(table.getState().pagination.pageSize)}>
|
||||
<SelectTrigger
|
||||
id={id}
|
||||
aria-label='Выбор количества строчек на странице'
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export function SelectVersion({
|
|||
}
|
||||
}
|
||||
return (
|
||||
<Select onValueChange={handleSelect} defaultValue={String(value)}>
|
||||
<Select onValueChange={handleSelect} value={String(value)}>
|
||||
<SelectTrigger id={id} className={cn('min-w-48', className)} {...restProps}>
|
||||
<SelectValue placeholder={placeholder} />
|
||||
</SelectTrigger>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ interface SelectCstTypeProps extends Styling {
|
|||
|
||||
export function SelectCstType({ id, value, onChange, className, disabled = false, ...restProps }: SelectCstTypeProps) {
|
||||
return (
|
||||
<Select onValueChange={onChange} defaultValue={value} disabled={disabled}>
|
||||
<Select onValueChange={onChange} value={value} disabled={disabled}>
|
||||
<SelectTrigger id={id} className={cn('w-66', className)} {...restProps}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export function SelectColoring({ className, schema }: SelectColoringProps) {
|
|||
{coloring === 'schemas' ? <SchemasGuide schema={schema} /> : null}
|
||||
</div>
|
||||
|
||||
<Select onValueChange={setColoring} defaultValue={coloring}>
|
||||
<Select onValueChange={setColoring} value={coloring}>
|
||||
<SelectTrigger noBorder className='w-full'>
|
||||
<SelectValue placeholder='Цветовая схема' />
|
||||
</SelectTrigger>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export function SelectGraphType({ className }: SelectGraphTypeProps) {
|
|||
|
||||
return (
|
||||
<div className={cn('relative border select-none bg-input pointer-events-auto', className)}>
|
||||
<Select onValueChange={setGraphType} defaultValue={graphType}>
|
||||
<Select onValueChange={setGraphType} value={graphType}>
|
||||
<SelectTrigger noBorder className='w-full'>
|
||||
<SelectValue placeholder='Цветовая схема' />
|
||||
</SelectTrigger>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user