Max SQL query text box resize to query length

This commit is contained in:
Peter Stockings
2024-11-09 23:18:57 +11:00
parent 0b7b804d62
commit 2d6c738e3e

View File

@@ -18,7 +18,9 @@
<label for="query" class="block text-sm font-medium text-gray-700 pb-1">Query</label>
<textarea name="query" spellcheck="false" id="query"
class="w-full h-48 p-4 font-mono text-sm text-gray-800 bg-gray-100 border border-gray-300 rounded-md resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
placeholder="Enter your SQL query here..." required>{{ query }}</textarea>
placeholder="Enter your SQL query here..." required
_="on load set my.style.height to my.scrollHeight + 'px'
on input set my.style.height to 0 then set my.style.height to my.scrollHeight + 'px'">{{ query }}</textarea>
</div>
<!-- Buttons -->