mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Fix editor height to improve scroll experience
This commit is contained in:
parent
320a1b1c96
commit
230d17da35
|
@ -23,7 +23,16 @@ import { rsHoverTooltip } from './tooltip';
|
||||||
interface RSInputProps
|
interface RSInputProps
|
||||||
extends Pick<
|
extends Pick<
|
||||||
ReactCodeMirrorProps,
|
ReactCodeMirrorProps,
|
||||||
'id' | 'height' | 'minHeight' | 'maxHeight' | 'value' | 'onFocus' | 'onBlur' | 'placeholder' | 'style' | 'className'
|
| 'id' // prettier: split-lines
|
||||||
|
| 'height'
|
||||||
|
| 'minHeight'
|
||||||
|
| 'maxHeight'
|
||||||
|
| 'value'
|
||||||
|
| 'onFocus'
|
||||||
|
| 'onBlur'
|
||||||
|
| 'placeholder'
|
||||||
|
| 'style'
|
||||||
|
| 'className'
|
||||||
> {
|
> {
|
||||||
label?: string;
|
label?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
|
|
@ -50,7 +50,18 @@ const editorSetup: BasicSetupOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface RefsInputInputProps
|
interface RefsInputInputProps
|
||||||
extends Pick<ReactCodeMirrorProps, 'id' | 'height' | 'value' | 'className' | 'onFocus' | 'onBlur' | 'placeholder'> {
|
extends Pick<
|
||||||
|
ReactCodeMirrorProps,
|
||||||
|
| 'id' // prettier: split-lines
|
||||||
|
| 'height'
|
||||||
|
| 'minHeight'
|
||||||
|
| 'maxHeight'
|
||||||
|
| 'value'
|
||||||
|
| 'className'
|
||||||
|
| 'onFocus'
|
||||||
|
| 'onBlur'
|
||||||
|
| 'placeholder'
|
||||||
|
> {
|
||||||
label?: string;
|
label?: string;
|
||||||
onChange?: (newValue: string) => void;
|
onChange?: (newValue: string) => void;
|
||||||
schema?: IRSForm;
|
schema?: IRSForm;
|
||||||
|
|
|
@ -145,6 +145,7 @@ function FormConstituenta({
|
||||||
key='cst_term'
|
key='cst_term'
|
||||||
id='cst_term'
|
id='cst_term'
|
||||||
label='Термин'
|
label='Термин'
|
||||||
|
maxHeight='7.5rem'
|
||||||
placeholder='Обозначение, используемое в текстовых определениях'
|
placeholder='Обозначение, используемое в текстовых определениях'
|
||||||
schema={schema}
|
schema={schema}
|
||||||
value={term}
|
value={term}
|
||||||
|
@ -197,7 +198,8 @@ function FormConstituenta({
|
||||||
id='cst_definition'
|
id='cst_definition'
|
||||||
label='Текстовое определение'
|
label='Текстовое определение'
|
||||||
placeholder='Текстовая интерпретация формального выражения'
|
placeholder='Текстовая интерпретация формального выражения'
|
||||||
height='3.8rem'
|
minHeight='3.75rem'
|
||||||
|
maxHeight='7.5rem'
|
||||||
schema={schema}
|
schema={schema}
|
||||||
value={textDefinition}
|
value={textDefinition}
|
||||||
initialValue={state?.definition_raw ?? ''}
|
initialValue={state?.definition_raw ?? ''}
|
||||||
|
@ -210,7 +212,7 @@ function FormConstituenta({
|
||||||
<TextArea
|
<TextArea
|
||||||
id='cst_convention'
|
id='cst_convention'
|
||||||
spellCheck
|
spellCheck
|
||||||
className='h-[3.8rem]'
|
className='h-[3.75rem]'
|
||||||
label={isBasic ? 'Конвенция' : 'Комментарий'}
|
label={isBasic ? 'Конвенция' : 'Комментарий'}
|
||||||
placeholder={isBasic ? 'Договоренность об интерпретации' : 'Пояснение разработчика'}
|
placeholder={isBasic ? 'Договоренность об интерпретации' : 'Пояснение разработчика'}
|
||||||
value={convention}
|
value={convention}
|
||||||
|
|
|
@ -211,7 +211,8 @@ function EditorRSExpression({
|
||||||
<RSInput
|
<RSInput
|
||||||
ref={rsInput}
|
ref={rsInput}
|
||||||
value={value}
|
value={value}
|
||||||
minHeight='3.8rem'
|
minHeight='3.75rem'
|
||||||
|
maxHeight='7.5rem'
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
onAnalyze={handleCheckExpression}
|
onAnalyze={handleCheckExpression}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user