(newValue: string)
| 427 | }); |
| 428 | } |
| 429 | function handleTextInputChange(newValue: string) { |
| 430 | setTextInputValue(newValue); |
| 431 | // Commit immediately on each keystroke (sync validation) |
| 432 | if (currentField) { |
| 433 | commitTextField(currentField.name, currentField.schema, newValue); |
| 434 | |
| 435 | // For date/datetime fields, debounce async NL parsing after 2s of inactivity |
| 436 | if (dateDebounceRef.current !== undefined) { |
| 437 | clearTimeout(dateDebounceRef.current); |
| 438 | dateDebounceRef.current = undefined; |
| 439 | } |
| 440 | if (isDateTimeSchema(currentField.schema) && newValue.trim() !== '' && validationErrors[currentField.name]) { |
| 441 | const fieldName_5 = currentField.name; |
| 442 | const schema_3 = currentField.schema; |
| 443 | dateDebounceRef.current = setTimeout((dateDebounceRef_0, resolveFieldAsync_0, fieldName_6, schema_4, newValue_0) => { |
| 444 | dateDebounceRef_0.current = undefined; |
| 445 | resolveFieldAsync_0(fieldName_6, schema_4, newValue_0); |
| 446 | }, 2000, dateDebounceRef, resolveFieldAsync, fieldName_5, schema_3, newValue); |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | function handleTextInputSubmit() { |
| 451 | handleNavigation('down'); |
| 452 | } |
nothing calls this directly
no test coverage detected