Use a key that doesn't change to avoid re-render issues; closes #2203

This commit is contained in:
Dane Everitt 2020-08-01 18:48:58 -07:00
parent 21a4ce8043
commit b92c97060b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 12 additions and 11 deletions

View file

@ -39,7 +39,7 @@ const FileObjectRow = ({ file }: { file: FileObject }) => {
key={file.name}
onContextMenu={e => {
e.preventDefault();
window.dispatchEvent(new CustomEvent(`pterodactyl:files:ctx:${file.uuid}`, { detail: e.clientX }));
window.dispatchEvent(new CustomEvent(`pterodactyl:files:ctx:${file.key}`, { detail: e.clientX }));
}}
>
<SelectFileCheckbox name={file.name}/>