x4js 2.2.68 → 2.2.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/gridview/gridview.ts +1 -1
- package/src/components/menu/menu.module.scss +1 -1
- package/src/components/menu/menu.ts +26 -13
- package/src/components/textarea/textarea.module.scss +1 -1
- package/src/components/textarea/textarea.ts +7 -2
- package/src/core/core_data.ts +2 -2
package/package.json
CHANGED
|
@@ -989,7 +989,7 @@ export class Gridview<P extends GridviewProps = GridviewProps, E extends Gridvie
|
|
|
989
989
|
|
|
990
990
|
this._viewport = new Viewport({ content: this._body });
|
|
991
991
|
|
|
992
|
-
if (!this.
|
|
992
|
+
if (!this.props.footer) {
|
|
993
993
|
this.setStyleVariable("--footer-height", "0");
|
|
994
994
|
}
|
|
995
995
|
|
|
@@ -172,22 +172,35 @@ export class Menu extends Popup {
|
|
|
172
172
|
|
|
173
173
|
this.addClass( "x4vbox" );
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
else if( itm instanceof Component ) {
|
|
183
|
-
return itm;
|
|
175
|
+
if( props.items ) {
|
|
176
|
+
let children = props.items.filter( x=> !!x);
|
|
177
|
+
|
|
178
|
+
// trim separators
|
|
179
|
+
while( children.at(0)=='-' ) {
|
|
180
|
+
children.shift( );
|
|
184
181
|
}
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
|
|
183
|
+
while( children.at(-1)=='-' ) {
|
|
184
|
+
children.pop( );
|
|
187
185
|
}
|
|
188
|
-
});
|
|
189
186
|
|
|
190
|
-
|
|
187
|
+
const items = children.map( itm => {
|
|
188
|
+
if( itm==="-" ) {
|
|
189
|
+
return new CMenuSep( );
|
|
190
|
+
}
|
|
191
|
+
else if( isString(itm) ) {
|
|
192
|
+
return new CMenuItem( { text: itm, click: null, cls: 'title' } );
|
|
193
|
+
}
|
|
194
|
+
else if( itm instanceof Component ) {
|
|
195
|
+
return itm;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
return new CMenuItem( itm );
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
this.setContent( items );
|
|
203
|
+
}
|
|
191
204
|
}
|
|
192
205
|
}
|
|
193
206
|
|
|
@@ -49,7 +49,9 @@ export class SimpleTextArea extends Component<TextAreaProps> {
|
|
|
49
49
|
super( { ...props, tag: "textarea" } );
|
|
50
50
|
|
|
51
51
|
this.setAttribute( "name", props.name );
|
|
52
|
-
|
|
52
|
+
if( props.value ) {
|
|
53
|
+
this.setAttribute( "value", props.value+'' );
|
|
54
|
+
}
|
|
53
55
|
|
|
54
56
|
if( props.resize!==undefined ) {
|
|
55
57
|
this.setStyleValue( "resize", props.resize===false ? "none" : props.resize as string );
|
|
@@ -112,9 +114,12 @@ export class TextArea extends VBox {
|
|
|
112
114
|
constructor( props: TextAreaProps ) {
|
|
113
115
|
super( props );
|
|
114
116
|
|
|
117
|
+
|
|
118
|
+
const { label, value, resize, readonly, trim, name } = props;
|
|
119
|
+
|
|
115
120
|
this.setContent( [
|
|
116
121
|
new Label( { text: props.label }),
|
|
117
|
-
this._input = new SimpleTextArea(
|
|
122
|
+
this._input = new SimpleTextArea( { label,value,resize,readonly,trim } )
|
|
118
123
|
])
|
|
119
124
|
}
|
|
120
125
|
|
package/src/core/core_data.ts
CHANGED
|
@@ -275,7 +275,7 @@ export class DataModel<T = any> {
|
|
|
275
275
|
this.addField( ...fields );
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
|
|
279
279
|
/**
|
|
280
280
|
* dynamic DataModel
|
|
281
281
|
*/
|
|
@@ -1083,7 +1083,7 @@ export class DataStore<T = any> extends EventSource<DataStoreEventMap> {
|
|
|
1083
1083
|
} );
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
-
return result>=0 ? this.
|
|
1086
|
+
return result>=0 ? this.m_records[result] : null;
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
1089
|
export( ) {
|