Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 3x 3x 10x 24x 21x 21x 7x | import React from 'react';
import { useFormContext, Form, useI18nContext } from '@procore/core-react';
export function CompanyNameField() {
const { submitForm } = useFormContext();
const i18n = useI18nContext();
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
Iif (e.key === 'Enter') {
submitForm();
}
};
return (
<Form.Text
name="company"
label={i18n.t('views.generic.directory.add_company_package.search_label')}
required
colStart={1}
colWidth={10}
placeholder={i18n.t(
'views.generic.directory.add_company_package.company_name'
)}
autoComplete="off"
tabIndex={0}
autoFocus
onKeyDown={handleKeyDown}
/>
);
}
|