Skip to content

Commit

Permalink
fix: 修复 select autofocus 不生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xixileng committed Jul 17, 2023
1 parent 001a9ee commit dcd1b15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/input/useInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function useInput(props: ExtendsTdInputProps, expose: (exposed: R

const emitFocus = (e: FocusEvent) => {
inputValue.value = innerValue.value;
if (props.disabled || props.readonly) return;
if (props.disabled) return;
focused.value = true;
props.onFocus?.(innerValue.value, { e });
};
Expand Down
1 change: 1 addition & 0 deletions src/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ export default defineComponent({
collapsed-items={props.collapsedItems}
inputProps={{
size: props.size,
autofocus: props.autofocus,
...(props.inputProps as TdSelectProps['inputProps']),
onkeydown: handleKeyDown,
}}
Expand Down

0 comments on commit dcd1b15

Please sign in to comment.