Skip to content

Commit

Permalink
feat: sync changes from v2 to v2-develop (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: ecarreras <[email protected]>
  • Loading branch information
giscegit and ecarreras authored Dec 10, 2024
1 parent b8f7115 commit c5b3b86
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/ooui",
"version": "2.21.0",
"version": "2.22.0",
"engines": {
"node": "20.5.0"
},
Expand Down
12 changes: 0 additions & 12 deletions src/Field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ class Field extends Widget {
this._selectionValues = value;
}

/**
* Base type of the field
*/
_fieldType: string = "";
get fieldType(): string {
return this._fieldType;
}

constructor(props: any) {
super(props);

Expand All @@ -136,10 +128,6 @@ class Field extends Widget {
this._id = props.name;
}

if (props.type) {
this._fieldType = props.fieldsWidgetType;
}

if (props.activated) {
this._activated = props.activated;
}
Expand Down
11 changes: 11 additions & 0 deletions src/Widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ abstract class Widget {
this._isFunction = value;
}

/**
* Base type of the field
*/
_fieldType: string = "";
get fieldType(): string {
return this._fieldType;
}

constructor(props?: any) {
this._colspan = Widget._defaultColspan;
this._invisible = false;
Expand Down Expand Up @@ -160,6 +168,9 @@ abstract class Widget {
this._domain = replaceEntities(props.domain);
}
}
if (props.type) {
this._fieldType = props.fieldsWidgetType;
}
if (props.widget_props) {
if (typeof props.widget_props === "string") {
try {
Expand Down

0 comments on commit c5b3b86

Please sign in to comment.