Skip to content

Commit

Permalink
Fix menu edit
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Apr 21, 2024
1 parent 579e35a commit 4509ebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Module/Admin/Menu/assets/menu-edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const typeField = u.selectOne<HTMLInputElement>('#input-item-type')!;

typeField.addEventListener('change', (e) => {
if (typeField.value !== '' && typeField.value !== currentType) {
const v = u.$validation.get('#admin-form')[0];
const v = u.$validation.get('#admin-form')!;
v.options.enabled = false;

u.form(form).post(null, { task: 'switch_type' });
Expand All @@ -28,7 +28,7 @@ const viewField = u.selectOne<HTMLInputElement>('#input-item-view')!;

viewField.addEventListener('change', (e) => {
if (viewField.value !== '' && viewField.value !== currentView) {
const v = u.$validation.get('#admin-form')[0];
const v = u.$validation.get('#admin-form')!;
v.options.enabled = false;

u.form(form).post(null, { task: 'switch_type' });
Expand Down

0 comments on commit 4509ebc

Please sign in to comment.