Skip to content

Commit

Permalink
Merge branch 'dev' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Jul 25, 2024
2 parents 9a9f5b4 + 5a5448f commit 5308614
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ describe("CSelect", () => {
});
});

test("autofocus applies to correct element", () => {
const wrapper = mountApp(() => <CSelect for="Course" autofocus></CSelect>);

const elements = wrapper.findAll("[autofocus]");
expect(elements).toHaveLength(1);
expect(elements[0].element).toBeInstanceOf(HTMLInputElement);
});

describe("hint", () => {
test("shows persistent hint", () => {
const wrapper = mountApp(() => (
Expand Down
2 changes: 2 additions & 0 deletions src/coalesce-vue-vuetify3/src/components/input/c-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
v-model="mainValue"
@focus="focused = true"
@blur="focused = false"
:autofocus="autofocus"
:disabled="isDisabled.value"
:readonly="isReadonly.value"
:placeholder="internalModelValue ? undefined : placeholder"
Expand Down Expand Up @@ -259,6 +260,7 @@ const props = withDefaults(
ForeignKeyProperty | ModelReferenceNavigationProperty | ModelValue
>;
autofocus?: boolean;
clearable?: boolean;
placeholder?: string;
preselectFirst?: boolean;
Expand Down

0 comments on commit 5308614

Please sign in to comment.