ywana-core8 0.0.955 → 0.0.957
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/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +9 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +9 -9
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +9 -10
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -260,24 +260,23 @@ const DataTableCell = ({ index, row, column, cell, editable }) => {
|
|
260
260
|
/**
|
261
261
|
* Image Cell Viewer
|
262
262
|
*/
|
263
|
-
const ImageCellViewer = ({ id, value, uploadURL,
|
264
|
-
|
265
|
-
const canUpload = uploadURL ? true : false
|
263
|
+
const ImageCellViewer = ({ id, value, uploadURL, onChange }) => {
|
266
264
|
|
267
265
|
function success(file, message) {
|
268
|
-
if (
|
266
|
+
if (onChange) onChange(id, file, message)
|
269
267
|
}
|
270
268
|
|
271
269
|
function error(file, message) {
|
272
|
-
if (
|
270
|
+
if (onChange) onChange(id, file, message)
|
273
271
|
console.error(message)
|
274
272
|
}
|
275
273
|
|
276
|
-
return
|
277
|
-
<
|
278
|
-
|
279
|
-
|
280
|
-
|
274
|
+
return (
|
275
|
+
<div className="image-cell">
|
276
|
+
<img src={value} />
|
277
|
+
{ uploadURL ? <Uploader icon="cloud_upload" target={uploadURL} onSuccess={success} onError={error} /> : null }
|
278
|
+
</div>
|
279
|
+
)
|
281
280
|
}
|
282
281
|
|
283
282
|
/**
|