ywana-core8 0.0.420 → 0.0.421
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 +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +3 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +3 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +0 -2
- package/src/html/table.test.js +6 -1
- package/src/html/tokenfield.js +0 -1
- package/src/widgets/upload/UploadDialog.js +2 -1
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -146,10 +146,8 @@ const DataTableRow = (props) => {
|
|
146
146
|
*/
|
147
147
|
const DataTableCell = ({ row, column, cell, editable }) => {
|
148
148
|
|
149
|
-
|
150
149
|
const render = (type) => {
|
151
150
|
const { id, disabled = false, min, max, onChange, format, options, item } = column
|
152
|
-
|
153
151
|
if (id === "checked") {
|
154
152
|
return <CheckBox id={id} value={cell} onChange={(id, value) => onChange(row.id, id, value)} />
|
155
153
|
} else if (editable && onChange) {
|
package/src/html/table.test.js
CHANGED
@@ -10,6 +10,10 @@ const TableTest = (prop) => {
|
|
10
10
|
]
|
11
11
|
)
|
12
12
|
|
13
|
+
function editCell(row, cell, value) {
|
14
|
+
console.log(row, cell, value)
|
15
|
+
}
|
16
|
+
|
13
17
|
function select(row) {
|
14
18
|
console.log('select',row)
|
15
19
|
}
|
@@ -24,9 +28,10 @@ const TableTest = (prop) => {
|
|
24
28
|
}
|
25
29
|
|
26
30
|
const table = {
|
31
|
+
editable: true,
|
27
32
|
columns : [
|
28
33
|
{ id: "checked", onChange: check },
|
29
|
-
{ id: "name", label: "Name" },
|
34
|
+
{ id: "name", label: "Name", type: "String", onChange: editCell},
|
30
35
|
{ id: "thumb", label: "Thumb", type: "String", format: "IMG" },
|
31
36
|
|
32
37
|
],
|
package/src/html/tokenfield.js
CHANGED
@@ -10,7 +10,6 @@ import './tokenfield.css'
|
|
10
10
|
export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange }) => {
|
11
11
|
|
12
12
|
const [value, setValue] = useState()
|
13
|
-
const [open, setOpen] = useState(false)
|
14
13
|
|
15
14
|
function remove(index) {
|
16
15
|
const next = tokens.slice()
|
@@ -6,7 +6,7 @@ import { SiteContext, Dialog } from '../../site';
|
|
6
6
|
/**
|
7
7
|
* Upload Dialog
|
8
8
|
*/
|
9
|
-
export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onClose }) => {
|
9
|
+
export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onClose, children }) => {
|
10
10
|
|
11
11
|
const site = useContext(SiteContext);
|
12
12
|
|
@@ -35,6 +35,7 @@ export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onC
|
|
35
35
|
return (
|
36
36
|
<Dialog title={title} open={true} onAction={onAction} actions={actions}>
|
37
37
|
<Uploader label={label} accept={accept} target={target} onSuccess={success} onComplete={complete} />
|
38
|
+
{children}
|
38
39
|
</Dialog>
|
39
40
|
)
|
40
41
|
}
|