LongText (textarea)
<script setup lang="ts">
import { type Column, Filters, Formatters, SlickgridVue, type VanillaCalendarOption } from 'slickgrid-vue';
import { onBeforeMount, type Ref } from 'vue';
const gridOptions = ref<GridOption>();
const columnDefinitions: Ref<Column[]> = ref([]);
const dataset = ref<any[]>([]);
onBeforeMount(() => {
defineGrid();
});
function defineGrid() {
columnDefinitions.value = [
{
id: 'title', name: 'Title', field: 'title',
editor: {
model: Editors.longText,
required: true, maxLength: 12,
// previously known as `editorOptions` for < 9.0
options: {
cols: 45,
rows: 6,
position: 'auto', // defaults to "auto" but you can change to "top", "bottom", "left" or "right"
buttonTexts: {
// you can change the button texts
cancel: 'Close',
save: 'Done'
// or if you use translation you can use the properties with `Key` suffix
// cancelKey: 'CANCEL',
// saveKey: 'SAVE',
}
} as LongTextEditorOption,
},
},
];
}
</script>Last updated