@visns-studio/visns-components 3.8.4 → 3.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/crm/Field.jsx
CHANGED
|
@@ -977,13 +977,11 @@ function Field({
|
|
|
977
977
|
return (
|
|
978
978
|
<div
|
|
979
979
|
style={{
|
|
980
|
+
position: 'relative', // Parent container positioned relatively
|
|
980
981
|
display: 'inline-flex',
|
|
981
982
|
alignItems: 'center',
|
|
982
983
|
cursor: 'pointer',
|
|
983
984
|
}}
|
|
984
|
-
onClick={() => {
|
|
985
|
-
fileImageInputRef.current.click();
|
|
986
|
-
}}
|
|
987
985
|
>
|
|
988
986
|
<input
|
|
989
987
|
type="file"
|
|
@@ -991,7 +989,15 @@ function Field({
|
|
|
991
989
|
className={inputClass[settings.id]} // Assuming inputClass is defined elsewhere in your code
|
|
992
990
|
onChange={onChange}
|
|
993
991
|
ref={fileImageInputRef}
|
|
994
|
-
style={{
|
|
992
|
+
style={{
|
|
993
|
+
position: 'absolute',
|
|
994
|
+
left: 0,
|
|
995
|
+
top: 0,
|
|
996
|
+
width: '100%',
|
|
997
|
+
height: '100%',
|
|
998
|
+
opacity: 0, // Make the input invisible
|
|
999
|
+
cursor: 'pointer',
|
|
1000
|
+
}}
|
|
995
1001
|
/>
|
|
996
1002
|
{inputValue.imageSrc ? (
|
|
997
1003
|
<img
|
|
@@ -1004,7 +1010,7 @@ function Field({
|
|
|
1004
1010
|
/>
|
|
1005
1011
|
) : (
|
|
1006
1012
|
<img
|
|
1007
|
-
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAJ3UlEQVR4nO3b60/aXhwG8KflJijIJQgTt8y5mLkxl73w//8HzBbdXLLFqJsg3rjKnUJ/L0wJpYUC9ovbL8/nlRbac077tOf0tCiHh4c6iFymPncF6P+
|
|
1013
|
+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAJ3UlEQVR4nO3b60/aXhwG8KflJijIJQgTt8y5mLkxl73w//8HzBbdXLLFqJsg3rjKnUJ/L0wJpYUC9ovbL8/nlRbac077tOf0tCiHh4c6iFymPncF6P+JwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEsFgkQgGi0QwWCSCwSIRDBaJYLBIBINFIhgsEvEfmhiBahNiQpEAAAAASUVORK5CYII="
|
|
1008
1014
|
alt="Placeholder"
|
|
1009
1015
|
/>
|
|
1010
1016
|
)}
|
|
@@ -104,6 +104,7 @@ const GenericDynamic = ({
|
|
|
104
104
|
updateField(prevState, name, newValue)
|
|
105
105
|
);
|
|
106
106
|
} else if (files && files[0]) {
|
|
107
|
+
console.info('aa');
|
|
107
108
|
const toastId = toast.loading('Uploading file...'); // Show loading toast
|
|
108
109
|
// Start the upload process and read the file if it's an image
|
|
109
110
|
Vapor.store(files[0], {
|
package/package.json
CHANGED