mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
refactor(schema): simplify validation and OpenAPI generation (#2709)
This commit is contained in:
1 parent
4bc5593f9f
commit
de1fd95a99
510 files changed
+29494
-36131
No files matched your search
@@ -113,7 +113,7 @@ export const InlineEdit: React.FC<InlineEditProps> = observer((props) => {
|
||||
setMode('editing');
|
||||
}
|
||||
};
|
||||
const handleEditableInput: React.FormEventHandler<HTMLDivElement> = (e) => {
|
||||
const handleEditableInput: React.InputEventHandler<HTMLDivElement> = (e) => {
|
||||
const el = e.currentTarget;
|
||||
const raw = el.textContent ?? '';
|
||||
let next = sanitizeDraft(raw);
|
||||
|
||||
@@ -73,7 +73,7 @@ const assignRef = <T,>(ref: React.Ref<T> | undefined, value: T | null): void =>
|
||||
if (typeof ref === 'function') {
|
||||
ref(value);
|
||||
} else if (ref && typeof ref === 'object') {
|
||||
(ref as React.MutableRefObject<T | null>).current = value;
|
||||
ref.current = value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export const Switch = observer(
|
||||
);
|
||||
const resolvedLabelledBy = hasLabel ? labelId : ariaLabelledBy;
|
||||
const resolvedDescribedBy = [hasDescription ? descriptionId : null, ariaDescribedBy].filter(Boolean).join(' ');
|
||||
const rootRef = useRef<React.ElementRef<typeof SwitchPrimitive.Root>>(null);
|
||||
const rootRef = useRef<React.ComponentRef<typeof SwitchPrimitive.Root>>(null);
|
||||
const valueChange = useCallback(
|
||||
(next: boolean) => {
|
||||
if (disabled) return;
|
||||
|
||||
Reference in new issue
Block a user