We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea5cc67 commit a9f8c0eCopy full SHA for a9f8c0e
custom/CloneRowButton.vue
@@ -35,12 +35,17 @@ function redirectToCreatePage() {
35
const fieldsToFill = { ...props.resource.columns.filter((col: any) => col.showIn.create === true) }
36
let dataToFill = {};
37
for (const field of Object.values(fieldsToFill)) {
38
+ if (field.foreignResource) {
39
+ dataToFill[field.name] = props.record[field.name]?.pk
40
+ continue;
41
+ }
42
dataToFill[field.name] = props.record[field.name];
43
}
44
return dataToFill;
45
46
47
function save_btoa(str) {
- return btoa(str);
48
+ const cleaned = str.replace(/\uFEFF/g, '');
49
+ return btoa(cleaned);
50
51
</script>
0 commit comments