Skip to content

Commit

Permalink
refactor: Rename initialSelectAll to selectOnFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Sep 28, 2023
1 parent cac148b commit e71f78a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/VueDatePicker/components/DatepickerInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
} = useDefaults(props);
const parsedDate = ref();
const inputRef = ref<HTMLElement | null>(null);
const inputRef = ref<HTMLInputElement | null>(null);
const isFocused = ref(false);
const textPasted = ref(false);
Expand Down Expand Up @@ -229,7 +229,7 @@
const handleFocus = (): void => {
isFocused.value = true;
emit('focus');
if (defaultedTextInput.value.enabled && defaultedTextInput.value.initialFocusAll) {
if (defaultedTextInput.value.enabled && defaultedTextInput.value.selectOnFocus) {
inputRef.value?.select();
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/VueDatePicker/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface TextInputOptions {
tabSubmit: boolean;
openMenu: boolean;
rangeSeparator: string;
initialFocusAll: boolean;
selectOnFocus: boolean;
format?: string | string[] | ((value: string) => Date | null);
}

Expand Down
2 changes: 1 addition & 1 deletion src/VueDatePicker/utils/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const getDefaultTextInputOptions = (textInput: TextInputProp): TextInputO
enterSubmit: true,
tabSubmit: true,
openMenu: true,
initialFocusAll: false,
selectOnFocus: false,
rangeSeparator: ' - ',
};

Expand Down

0 comments on commit e71f78a

Please sign in to comment.