mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-08-01 09:58:42 -04:00
fix: save new group with enter key
This commit is contained in:
@@ -157,6 +157,7 @@
|
||||
.then((res) => {
|
||||
deviceGroups = [...deviceGroups, res as Group];
|
||||
toast.success(m.toasts_group_created({ group: newGroup }));
|
||||
newGroup = '';
|
||||
})
|
||||
.catch((err) => {
|
||||
toast.error(err.message);
|
||||
@@ -659,6 +660,12 @@
|
||||
class="input join-item"
|
||||
placeholder={m.device_groups_placeholder()}
|
||||
type="text"
|
||||
on:keydown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
addGroup();
|
||||
}
|
||||
}}
|
||||
bind:value={newGroup}
|
||||
/>
|
||||
<button class="btn btn-neutral join-item" type="button" on:click={() => addGroup()}
|
||||
|
||||
Reference in New Issue
Block a user