ywana-core8 0.0.822 → 0.0.824
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 +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +8 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +8 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +5 -1
- package/src/html/textfield.js +1 -1
package/package.json
CHANGED
@@ -511,8 +511,12 @@ export const CollectionContext = (url, field, host, page, fetching, versioning =
|
|
511
511
|
async create(form) {
|
512
512
|
try {
|
513
513
|
if (versioning) form.version = 1
|
514
|
-
await API.create(form);
|
514
|
+
const response = await API.create(form);
|
515
515
|
await this.load();
|
516
|
+
if (response) {
|
517
|
+
const { id } = response;
|
518
|
+
if (id) this.select(id)
|
519
|
+
}
|
516
520
|
} catch (error) {
|
517
521
|
console.log(error)
|
518
522
|
}
|
package/src/html/textfield.js
CHANGED
@@ -54,7 +54,7 @@ export const TextField = (props) => {
|
|
54
54
|
|
55
55
|
return (
|
56
56
|
<div className={`${style} ${id}`} onClick={onClick}>
|
57
|
-
<input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} onBlur={blur} readOnly={readOnly} step="any"
|
57
|
+
<input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} onBlur={blur} readOnly={readOnly} step="any" />
|
58
58
|
{readOnly === false && canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null}
|
59
59
|
<span className="bar"></span>
|
60
60
|
{label ? <label>{labelTxt}</label> : null}
|