Replies: 9 comments
-
Does it work with x-splade-select with choices? |
Beta Was this translation helpful? Give feedback.
-
Apologies for the vague description. It's not that it doesn't work, more like, it works too well. On every keypress for a text-field, the form disables the input while the form is getting submitted. It works fine and as expected for select/choices. (as only one keypress is needed) |
Beta Was this translation helpful? Give feedback.
-
This feature was built with a select element in mind. How would you like the component to behave? More like a 'saved in the background' thing? |
Beta Was this translation helpful? Give feedback.
-
Yeah, exactly. It seems perfect for save in the background. |
Beta Was this translation helpful? Give feedback.
-
Cool, I'll work on that! |
Beta Was this translation helpful? Give feedback.
-
Not documented yet, but you may now (v1.2.6) add a <x-splade-form submit-on-change background debounce="500">
<x-splade-input name="description" />
<p v-if="form.processing">Not triggered in background</p>
<p v-if="form.processingInBackground">Form is processing in background</p>
<x-splade-submit />
</x-splade-form> The |
Beta Was this translation helpful? Give feedback.
-
Beautiful. Edit: It works like a charm. It may be prudent to add a way to clear all toasts from the PHP code. |
Beta Was this translation helpful? Give feedback.
-
I'll add something like |
Beta Was this translation helpful? Give feedback.
-
Yeah sure - again it works fine as is. It just requires a very low auto-dismiss timeout, in order to prevent a flood of notifications. But it's still nice to get a visual confirmation that your details were saved. I probably wouldn't use the The optimal setup would be to limit the amount of toast w/ the same messages to only one. IMO. but that's a harder problem to tackle altogether. Therefore maybe the ability to fire an event that simply clears all toasts could also work. Eg. on the controller you know is receiving the background request, you could clear all toasts and then simply fire the new "changes saved" message - thus ensuring only a single instance of it is shown at a time. Again, it's only nice-to-have at best. It works fantastically w/ the low timeout now, so no worries about it :) |
Beta Was this translation helpful? Give feedback.
-
You may use the built-in Artisan Command to show the installed versions of the packages:
Description:
As soon as a single key is pressed and released, the textarea gets disabled while it waits for the submit roundtrip. Ideally, only a blur event should trigger a save, for text fields.
Steps To Reproduce Issue:
Beta Was this translation helpful? Give feedback.
All reactions