File tree Expand file tree Collapse file tree 3 files changed +11
-20
lines changed
packages/Webkul/Admin/src/Resources/views/components Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class Kernel extends HttpKernel
21
21
\Illuminate \Foundation \Http \Middleware \ValidatePostSize::class,
22
22
\App \Http \Middleware \TrimStrings::class,
23
23
\Webkul \Installer \Http \Middleware \CanInstall::class,
24
+ \Illuminate \Foundation \Http \Middleware \ConvertEmptyStringsToNull::class,
24
25
];
25
26
26
27
/**
Original file line number Diff line number Diff line change @@ -131,24 +131,16 @@ class="px-4 py-2 text-center text-gray-500"
131
131
};
132
132
},
133
133
134
+ mounted () {
135
+ if (this .value ) {
136
+ this .selectedItem = this .value ;
137
+ }
138
+ },
134
139
135
140
watch: {
136
- value (newValue , oldValue ) {
137
- if (
138
- JSON .stringify (newValue)
139
- !== JSON .stringify (oldValue)
140
- ) {
141
- this .searchTerm = newValue ? newValue[' name' ] : ' ' ;
142
-
143
- this .entityId = newValue ? newValue[' id' ] : ' ' ;
144
-
145
- if (this .searchTerm == ' ' ) {
146
- this .remove ();
147
- } else {
148
- this .getLookUpEntity ();
149
- }
150
- }
151
- }
141
+ searchTerm (newVal , oldVal ) {
142
+ this .search ();
143
+ },
152
144
},
153
145
154
146
mounted () {
@@ -235,8 +227,8 @@ class="px-4 py-2 text-center text-gray-500"
235
227
this .searchedResults = [];
236
228
237
229
this .$emit (' lookup-removed' );
238
- }
239
- }
230
+ },
231
+ },
240
232
});
241
233
< / script>
242
234
@endPushOnce
Original file line number Diff line number Diff line change @@ -177,8 +177,6 @@ class="cursor-pointer border-t border-gray-800 px-4 py-2 text-gray-500 hover:bg-
177
177
if (this .value ) {
178
178
this .selectedItem = this .value ;
179
179
}
180
-
181
- console .log (this .selectedItem ? .name == " " );
182
180
},
183
181
184
182
created () {
You can’t perform that action at this time.
0 commit comments