Skip to content

Commit 160adec

Browse files
committed
reset region when checking public box
1 parent 81885c4 commit 160adec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/plugins/drivelistmanager.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export function DriveInputComponent({
6868
<input
6969
type="checkbox"
7070
checked={isPublic}
71-
onChange={event => setIsPublic(event.target.checked)}
71+
onChange={event => {
72+
setIsPublic(event.target.checked);
73+
setRegion('');
74+
}}
7275
/>
7376
{!isPublic && (
7477
<input
@@ -213,7 +216,7 @@ export function DriveListManagerComponent({ model }: IProps) {
213216
// Check if user has access to drive.
214217
const result = await mountDrive(publicDrive, {
215218
provider: 's3',
216-
location: isPublic ? '' : driveRegion
219+
location: driveRegion
217220
});
218221
if (result && result.error) {
219222
// Show error in case of failure.

0 commit comments

Comments
 (0)