|
|
@ -23,11 +23,12 @@ export class DatabaseIndex extends BI.Widget { |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { value, inputType } = this.options; |
|
|
|
const { value, inputType } = this.options; |
|
|
|
this.store.setInpueValue(value); |
|
|
|
this.store.setInpueValue(value); |
|
|
|
|
|
|
|
this.store.setInputType(inputType); |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: TabXtype, |
|
|
|
type: TabXtype, |
|
|
|
single: true, |
|
|
|
single: true, |
|
|
|
showIndex: inputType, |
|
|
|
showIndex: this.model.inputType, |
|
|
|
ref: (_ref: any) => { |
|
|
|
ref: (_ref: any) => { |
|
|
|
this.databaseIndexTab = _ref; |
|
|
|
this.databaseIndexTab = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -68,6 +69,7 @@ export class DatabaseIndex extends BI.Widget { |
|
|
|
|
|
|
|
|
|
|
|
public setSelect(value: string) { |
|
|
|
public setSelect(value: string) { |
|
|
|
this.databaseIndexTab.setSelect(value); |
|
|
|
this.databaseIndexTab.setSelect(value); |
|
|
|
|
|
|
|
this.store.setInputType(value); |
|
|
|
if (value === 'formula') { |
|
|
|
if (value === 'formula') { |
|
|
|
openFormulaPopover({ |
|
|
|
openFormulaPopover({ |
|
|
|
formula: this.model.inputValue === 0 ? '' : this.model.inputValue as string, |
|
|
|
formula: this.model.inputValue === 0 ? '' : this.model.inputValue as string, |
|
|
@ -79,6 +81,6 @@ export class DatabaseIndex extends BI.Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public getValue() { |
|
|
|
public getValue() { |
|
|
|
return this.model.inputValue; |
|
|
|
return this.model.inputType === 'int' ? parseInt(`${this.model.inputValue}`, 10) : this.model.inputValue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|