这是indexloc提供的服务,不要输入任何密码
Skip to content

Change properties of Modal #10

@InsOpDe

Description

@InsOpDe

Consider following scenario:

const SomeComponent: FC = () => {
	const {
		dispatchFileAction,
		files
	} = useFile()
	return (
	    <button
		    onClick={ (): void => {
			    Reoverlay.showModal(FileBrowserModal, {
				    files,
				    onFolderOpen: (file): void => {
					    void dispatchFileAction({
						    payload: file.key,
						    type: EFileAction.openDirectory
					    })
				    }
			    })
		    } }
		    type="button"
	    >
		    Toggle File Browser
	    </button>
	)
}

How would I correctly update properties of the used modal FileBrowserModal?

Would be a static method like Reoverlay.updateProps feasable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions