diff --git a/schemas/app/Address.json b/schemas/app/Address.json index f4f43847..5e252050 100644 --- a/schemas/app/Address.json +++ b/schemas/app/Address.json @@ -84,5 +84,5 @@ "country", "postalCode" ], - "inlineEditDisplayField": "addressDisplay" + "linkDisplayField": "addressDisplay" } diff --git a/schemas/app/Party.json b/schemas/app/Party.json index 2ee7d547..93f41983 100644 --- a/schemas/app/Party.json +++ b/schemas/app/Party.json @@ -74,7 +74,7 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true + "create": true }, { "fieldname": "taxId", diff --git a/schemas/app/PrintSettings.json b/schemas/app/PrintSettings.json index c534216f..c65cebdc 100644 --- a/schemas/app/PrintSettings.json +++ b/schemas/app/PrintSettings.json @@ -34,7 +34,6 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true, "create": true, "section": "Contacts" }, diff --git a/schemas/app/inventory/Location.json b/schemas/app/inventory/Location.json index 45161032..2f257458 100644 --- a/schemas/app/inventory/Location.json +++ b/schemas/app/inventory/Location.json @@ -16,7 +16,7 @@ "label": "Address", "fieldtype": "Link", "target": "Address", - "inline": true + "create": true } ], "quickEditFields": ["item", "address"] diff --git a/schemas/index.ts b/schemas/index.ts index 46c8bb6a..eccd6b39 100644 --- a/schemas/index.ts +++ b/schemas/index.ts @@ -50,8 +50,8 @@ function removeFields(schemaMap: SchemaMap): SchemaMap { (fn) => fn !== fieldname ); - if (schema.inlineEditDisplayField === fieldname) { - delete schema.inlineEditDisplayField; + if (schema.linkDisplayField === fieldname) { + delete schema.linkDisplayField; } } diff --git a/schemas/tests/Party.json b/schemas/tests/Party.json index b833ec4e..48726c81 100644 --- a/schemas/tests/Party.json +++ b/schemas/tests/Party.json @@ -72,8 +72,7 @@ "fieldname": "address", "label": "Address", "fieldtype": "Link", - "target": "Address", - "inline": true + "target": "Address" } ], "quickEditFields": [ diff --git a/schemas/types.ts b/schemas/types.ts index f542bdf3..7b505975 100644 --- a/schemas/types.ts +++ b/schemas/types.ts @@ -61,7 +61,6 @@ export interface BaseField { placeholder?: string; // UI Facing config, form field placeholder groupBy?: string; // UI Facing used in dropdowns fields meta?: boolean; // Field is a meta field, i.e. only for the db, not UI - inline?: boolean; // UI Facing config, whether to display doc inline. filter?: boolean; // UI Facing config, whether to be used to filter the List. computed?: boolean; // Computed values are not stored in the database. section?: string; // UI Facing config, for grouping by sections @@ -118,7 +117,7 @@ export interface Schema { isSubmittable?: boolean; // For transactional types, values considered only after submit keywordFields?: string[]; // Used to get fields that are to be used for search. quickEditFields?: string[]; // Used to get fields for the quickEditForm - inlineEditDisplayField?:string;// Display field if inline editable + linkDisplayField?:string;// Display field if inline editable naming?: Naming; // Used for assigning name, default is 'random' else 'numberSeries' if present titleField?: string; // Main display field removeFields?: string[]; // Used by the builder to remove fields. diff --git a/src/components/Controls/FormControl.vue b/src/components/Controls/FormControl.vue index ad87c458..323430ca 100644 --- a/src/components/Controls/FormControl.vue +++ b/src/components/Controls/FormControl.vue @@ -48,6 +48,12 @@ export default { }); }, methods: { + clear() { + const input = this.$refs.control.$refs.input; + if (input instanceof HTMLInputElement) { + input.value = ''; + } + }, focus() { this.$refs.control.focus(); }, diff --git a/src/components/Controls/Link.vue b/src/components/Controls/Link.vue index 640b6a65..15a518b7 100644 --- a/src/components/Controls/Link.vue +++ b/src/components/Controls/Link.vue @@ -35,7 +35,7 @@ export default { const value = newValue ?? this.value; const { fieldname, target } = this.df ?? {}; - const displayField = fyo.schemaMap[target ?? '']?.inlineEditDisplayField; + const displayField = fyo.schemaMap[target ?? '']?.linkDisplayField; if (!displayField) { return (this.linkValue = value); diff --git a/src/components/Controls/Select.vue b/src/components/Controls/Select.vue index 087c04ba..67d6b5a2 100644 --- a/src/components/Controls/Select.vue +++ b/src/components/Controls/Select.vue @@ -23,7 +23,12 @@ @change="(e) => triggerChange(e.target.value)" @focus="(e) => $emit('focus', e)" > -