forked from Sage-Bionetworks/SynapseWebClient
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrate react file browser (in experimental mode)
- Loading branch information
1 parent
7fc9048
commit f6f1e1c
Showing
5 changed files
with
89 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/org/sagebionetworks/web/client/jsinterop/EntityFileBrowserProps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.sagebionetworks.web.client.jsinterop; | ||
|
||
import jsinterop.annotations.JsFunction; | ||
import jsinterop.annotations.JsOverlay; | ||
import jsinterop.annotations.JsPackage; | ||
import jsinterop.annotations.JsType; | ||
import org.sagebionetworks.web.client.jsni.ReferenceJSNIObject; | ||
|
||
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") | ||
public class EntityFileBrowserProps extends ReactComponentProps { | ||
|
||
@FunctionalInterface | ||
@JsFunction | ||
public interface OnSelectCallback { | ||
void run(ReferenceJSNIObject selected); | ||
} | ||
|
||
OnSelectCallback onSelect; | ||
String parentContainerId; | ||
|
||
@JsOverlay | ||
public static EntityFileBrowserProps create( | ||
String parentContainerId, | ||
OnSelectCallback onSelect | ||
) { | ||
EntityFileBrowserProps props = new EntityFileBrowserProps(); | ||
props.parentContainerId = parentContainerId; | ||
props.onSelect = onSelect; | ||
return props; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters