mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 17:22:20 -05:00
Feature/form improvements (#1707)
* adding more options for form * added form requied and info for item
This commit is contained in:
@@ -255,6 +255,9 @@ class FormContainerBuilder extends ContainerBuilderImpl<sqlops.FormContainer, sq
|
||||
|
||||
private convertToItemConfig(formComponent: sqlops.FormComponent, itemLayout?: sqlops.FormItemLayout): InternalItemConfig {
|
||||
let componentWrapper = formComponent.component as ComponentWrapper;
|
||||
if (itemLayout && itemLayout.required && componentWrapper) {
|
||||
componentWrapper.required = true;
|
||||
}
|
||||
let actions: string[] = undefined;
|
||||
if (formComponent.actions) {
|
||||
actions = formComponent.actions.map(action => {
|
||||
@@ -400,6 +403,13 @@ class ComponentWrapper implements sqlops.Component {
|
||||
this.setProperty('width', v);
|
||||
}
|
||||
|
||||
public get required(): boolean {
|
||||
return this.properties['required'];
|
||||
}
|
||||
public set required(v: boolean) {
|
||||
this.setProperty('required', v);
|
||||
}
|
||||
|
||||
public toComponentShape(): IComponentShape {
|
||||
return <IComponentShape>{
|
||||
id: this.id,
|
||||
|
||||
Reference in New Issue
Block a user