Skip to content

Commit b49833b

Browse files
author
Serverfire
committed
auto size textarea
1 parent f67e011 commit b49833b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

dev/projects/grouping/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Vue from "vue";
22
import VueFormGenerator from "../../../src";
3-
import BootstrapVue from 'bootstrap-vue'
3+
import BootstrapVue from "bootstrap-vue";
44

55
Vue.use(VueFormGenerator);
6-
Vue.use(BootstrapVue)
6+
Vue.use(BootstrapVue);
77

88
import App from "./app.vue";
99

dist/vfg-core.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vfg.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/fields/core/fieldTextArea.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@
1111
:required="schema.required",
1212
:rows="schema.rows || 2",
1313
:name="schema.inputName",
14+
@input="textareaResize"
1415
v-attributes="'input'")
1516
</template>
1617

1718
<script>
1819
import abstractField from "../abstractField";
1920
2021
export default {
21-
mixins: [abstractField]
22+
mixins: [abstractField],
23+
methods: {
24+
textareaResize(event) {
25+
event.path[0].style.minHeight = event.path[0].scrollHeight + 'px';
26+
}
27+
}
2228
};
2329
</script>
2430

0 commit comments

Comments
 (0)