mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-08-14 21:00:37 +03:00
Small UI fixes
This commit is contained in:
parent
93136b4843
commit
3e5dda2db2
|
@ -114,6 +114,27 @@ function RSInput({
|
||||||
} else if (event.code === 'KeyZ') {
|
} else if (event.code === 'KeyZ') {
|
||||||
text.insertChar('Z');
|
text.insertChar('Z');
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyR') {
|
||||||
|
text.insertChar('R');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyF') {
|
||||||
|
text.insertChar('F');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyP') {
|
||||||
|
text.insertChar('P');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyX') {
|
||||||
|
text.insertChar('X');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyS') {
|
||||||
|
text.insertChar('S');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyD') {
|
||||||
|
text.insertChar('D');
|
||||||
|
event.preventDefault();
|
||||||
|
} else if (event.code === 'KeyC') {
|
||||||
|
text.insertChar('C');
|
||||||
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
} else if (event.altKey) {
|
} else if (event.altKey) {
|
||||||
if (text.processAltKey(event.code, event.shiftKey)) {
|
if (text.processAltKey(event.code, event.shiftKey)) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { createColumnHelper } from '@tanstack/react-table';
|
import { createColumnHelper } from '@tanstack/react-table';
|
||||||
import { Dispatch, useCallback, useMemo, useState } from 'react';
|
import { Dispatch, useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import MiniButton from '../../components/Common/MiniButton';
|
import MiniButton from '../../components/Common/MiniButton';
|
||||||
import DataTable, { IConditionalStyle } from '../../components/DataTable';
|
import DataTable, { IConditionalStyle } from '../../components/DataTable';
|
||||||
|
@ -32,9 +32,19 @@ function ArgumentsTab({ state, schema, partialUpdate }: ArgumentsTabProps) {
|
||||||
|
|
||||||
const [argumentValue, setArgumentValue] = useState('');
|
const [argumentValue, setArgumentValue] = useState('');
|
||||||
|
|
||||||
|
useEffect(
|
||||||
|
() => {
|
||||||
|
if (!selectedArgument && state.arguments.length > 0) {
|
||||||
|
setSelectedArgument(state.arguments[0]);
|
||||||
|
}
|
||||||
|
}, [state.arguments, selectedArgument]);
|
||||||
|
|
||||||
const handleSelectArgument = useCallback(
|
const handleSelectArgument = useCallback(
|
||||||
(arg: IArgumentValue) => {
|
(arg: IArgumentValue) => {
|
||||||
setSelectedArgument(arg);
|
setSelectedArgument(arg);
|
||||||
|
if (arg.value) {
|
||||||
|
setArgumentValue(arg.value);
|
||||||
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleSelectConstituenta = useCallback(
|
const handleSelectConstituenta = useCallback(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user