feat: Add assignment component with drag and drop to Set node (#8283)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
@@ -35,9 +35,9 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isSingleLine: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
rows: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
path: {
|
||||
type: String,
|
||||
@@ -92,7 +92,7 @@ export default defineComponent({
|
||||
mounted() {
|
||||
const extensions = [
|
||||
n8nLang(),
|
||||
inputTheme({ isSingleLine: this.isSingleLine }),
|
||||
inputTheme({ rows: this.rows }),
|
||||
Prec.highest(
|
||||
keymap.of([
|
||||
{ key: 'Tab', run: acceptCompletion },
|
||||
|
||||
@@ -15,11 +15,12 @@ const commonThemeProps = {
|
||||
},
|
||||
};
|
||||
|
||||
export const inputTheme = ({ isSingleLine } = { isSingleLine: false }) => {
|
||||
export const inputTheme = ({ rows } = { rows: 5 }) => {
|
||||
const maxHeight = Math.max(rows * 22 + 8);
|
||||
const theme = EditorView.theme({
|
||||
...commonThemeProps,
|
||||
'&': {
|
||||
maxHeight: isSingleLine ? '30px' : '112px',
|
||||
maxHeight: `${maxHeight}px`,
|
||||
minHeight: '30px',
|
||||
width: '100%',
|
||||
fontSize: 'var(--font-size-2xs)',
|
||||
|
||||
Reference in New Issue
Block a user