mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
remove px from width string and then parse (#11241)
This commit is contained in:
@@ -608,11 +608,7 @@ function processCheckboxField(context: FieldContext): void {
|
|||||||
* @param context The context to use to create the field
|
* @param context The context to use to create the field
|
||||||
*/
|
*/
|
||||||
function processFilePickerField(context: FieldContext): FilePickerInputs {
|
function processFilePickerField(context: FieldContext): FilePickerInputs {
|
||||||
const inputWidth = parseInt(context.fieldInfo.inputWidth!);
|
const inputWidth = parseInt(context.fieldInfo.inputWidth!.replace(/px/g, '').trim());
|
||||||
if (inputWidth === NaN) {
|
|
||||||
// this is a dev time only error
|
|
||||||
throw new Error('Unable to parse the input width of the file picker field');
|
|
||||||
}
|
|
||||||
const buttonWidth = 100;
|
const buttonWidth = 100;
|
||||||
|
|
||||||
const label = createLabel(context.view, { text: context.fieldInfo.label, description: context.fieldInfo.description, required: context.fieldInfo.required, width: context.fieldInfo.labelWidth, cssStyles: context.fieldInfo.labelCSSStyles });
|
const label = createLabel(context.view, { text: context.fieldInfo.label, description: context.fieldInfo.description, required: context.fieldInfo.required, width: context.fieldInfo.labelWidth, cssStyles: context.fieldInfo.labelCSSStyles });
|
||||||
|
|||||||
Reference in New Issue
Block a user