feat: autofill all fields on enter details and countryselector clean up

This commit is contained in:
Simon Emanuelsson
2025-05-06 08:43:15 +02:00
parent 81c2afe570
commit 4d41d4fd92
9 changed files with 290 additions and 33 deletions

View File

@@ -27,6 +27,7 @@ export function SelectFilter({
onSelectionChange = () => undefined,
onFocus = () => undefined,
onBlur = () => undefined,
autoComplete,
...props
}: SelectFilterProps) {
const [focus, setFocus] = useState(false)
@@ -73,7 +74,7 @@ export function SelectFilter({
<span className={styles.label}>{label}</span>
</Typography>
<Typography variant="Body/Paragraph/mdRegular">
<Input className={styles.input} />
<Input className={styles.input} autoComplete={autoComplete} />
</Typography>
</span>
<Button className={styles.button}>

View File

@@ -10,6 +10,7 @@ interface Item extends Record<string, unknown> {
}
export interface SelectProps extends ComponentProps<typeof Select> {
autoComplete?: string
icon?: MaterialIconProps['icon']
itemIcon?: MaterialIconProps['icon']
items: Item[]
@@ -24,6 +25,7 @@ export interface SelectItemProps extends ComponentProps<typeof ListBoxItem> {
}
export interface SelectFilterProps extends ComponentProps<typeof ComboBox> {
autoComplete?: string
icon?: MaterialIconProps['icon']
itemIcon?: MaterialIconProps['icon']
items: Item[]