-
Notifications
You must be signed in to change notification settings - Fork 156
Suggest transaction_data folders in open workspaces when associating directories #1892
Suggest transaction_data folders in open workspaces when associating directories #1892
Conversation
e7703d9
to
dec63fc
Compare
@@ -65,7 +67,18 @@ export async function associateTransactionDataDirectory(chaincode?: Instantiated | |||
|
|||
gateway = await FabricGatewayConnectionManager.instance().getGatewayRegistryEntry(); | |||
|
|||
const quickPickItems: string[] = [UserInputUtil.BROWSE_LABEL]; | |||
const quickPickItems: Array<{ label: string, description: string }> = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be of type IBlockchainQuickPickItem
then you can put the path as the data even if you also have the path as the description too
dec63fc
to
8769d61
Compare
@@ -74,11 +88,12 @@ export async function associateTransactionDataDirectory(chaincode?: Instantiated | |||
filters: undefined | |||
}; | |||
|
|||
const transactionDataPath: string = await UserInputUtil.browse(`Choose a directory to associate with ${chaincodeLabel}`, quickPickItems, openDialogOptions) as string; | |||
if (!transactionDataPath) { | |||
const chosenDirectory: string | { label: string, description: string } = await UserInputUtil.browseWithOptions(`Choose a directory to associate with ${chaincodeLabel}`, quickPickItems, openDialogOptions) as string | {label: string, description: string }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the return type should be a string or a IBlockchainQuickPickItem
Signed-off-by: Erin Hughes <Erin.Hughes@ibm.com>
8769d61
to
52160d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Closes #1855 and contributes to #1155
Signed-off-by: Erin Hughes Erin.Hughes@ibm.com