create-mikstack 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -129,6 +129,12 @@
|
|
|
129
129
|
id="{createNoteForm.id}-content"
|
|
130
130
|
oninput={(e) =>
|
|
131
131
|
createNoteForm.fields.content.set((e.target as HTMLTextAreaElement).value)}
|
|
132
|
+
onkeydown={(e) => {
|
|
133
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
document.getElementById(createNoteForm.id)?.requestSubmit();
|
|
136
|
+
}
|
|
137
|
+
}}
|
|
132
138
|
value={createNoteForm.fields.content.value() as string}
|
|
133
139
|
placeholder="Write something..."
|
|
134
140
|
/>
|
|
@@ -140,7 +146,7 @@
|
|
|
140
146
|
|
|
141
147
|
<Button type="submit" disabled={createNoteForm.pending}>
|
|
142
148
|
<Plus size={16} weight="bold" />
|
|
143
|
-
{createNoteForm.pending ? "Creating..." : "Create note"}
|
|
149
|
+
{createNoteForm.pending ? "Creating..." : "Create note"} <kbd>Ctrl+Enter</kbd>
|
|
144
150
|
</Button>
|
|
145
151
|
</form>
|
|
146
152
|
</section>
|
|
@@ -178,6 +184,12 @@
|
|
|
178
184
|
id="{editForm.id}-content"
|
|
179
185
|
oninput={(e) =>
|
|
180
186
|
editForm.fields.content.set((e.target as HTMLTextAreaElement).value)}
|
|
187
|
+
onkeydown={(e) => {
|
|
188
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
189
|
+
e.preventDefault();
|
|
190
|
+
document.getElementById(editForm.id)?.requestSubmit();
|
|
191
|
+
}
|
|
192
|
+
}}
|
|
181
193
|
value={editForm.fields.content.value() as string}
|
|
182
194
|
/>
|
|
183
195
|
</FormField>
|