Skip to content

Commit 20addbb

Browse files
authored
Merge pull request #68 from devforth/fix-readonly-on-edit
fix: rename readonly prop in select and date picker
2 parents 72acab8 + 5bd71cf commit 20addbb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

adminforth/spa/src/afcl/Select.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<input
55
ref="inputEl"
66
type="text"
7-
:readonly="isReadonly"
7+
:readonly="readonly"
88
v-model="search"
99
@click="inputClick"
1010
@input="inputInput"
@@ -102,7 +102,7 @@ const props = defineProps({
102102
type: String,
103103
default: '',
104104
},
105-
isReadonly: {
105+
readonly: {
106106
type: Boolean,
107107
default: false,
108108
},
@@ -147,7 +147,7 @@ function updateFromProps() {
147147
}
148148
149149
function inputClick() {
150-
if (props.isReadonly) return;
150+
if (props.readonly) return;
151151
// Toggle local dropdown
152152
showDropdown.value = !showDropdown.value;
153153
// If the dropdown is about to close, reset the search

adminforth/spa/src/components/CustomDatePicker.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<input ref="datepickerStartEl" type="text"
1313
class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
14-
:placeholder="$t('Select date')" :disabled="isReadonly" />
14+
:placeholder="$t('Select date')" :disabled="readonly" />
1515

1616
</div>
1717
</div>
@@ -27,7 +27,7 @@
2727

2828
<input v-model="startTime" type="time" id="start-time" onfocus="this.showPicker()" onclick="this.showPicker()" step="1"
2929
class="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
30-
value="00:00" :disabled="isReadonly" required/>
30+
value="00:00" :disabled="readonly" required/>
3131
</div>
3232
</div>
3333
</div>
@@ -72,7 +72,7 @@ const props = defineProps({
7272
autoHide: {
7373
type: Boolean,
7474
},
75-
isReadonly: {
75+
readonly: {
7676
type: Boolean,
7777
},
7878
});

0 commit comments

Comments
 (0)