hyperapp-is 0.1.47 → 0.1.49
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.
|
@@ -207,6 +207,14 @@ export const HistoryInput = function (props) {
|
|
|
207
207
|
}), e);
|
|
208
208
|
};
|
|
209
209
|
// ---------- ---------- ----------
|
|
210
|
+
// action_clear
|
|
211
|
+
// ---------- ---------- ----------
|
|
212
|
+
const action_clear = (state) => {
|
|
213
|
+
return setValue(setLocalState(state, id, {
|
|
214
|
+
histories: []
|
|
215
|
+
}), keyNames, "");
|
|
216
|
+
};
|
|
217
|
+
// ---------- ---------- ----------
|
|
210
218
|
// VNode
|
|
211
219
|
// ---------- ---------- ----------
|
|
212
220
|
const vnode = [
|
|
@@ -222,7 +230,11 @@ export const HistoryInput = function (props) {
|
|
|
222
230
|
id: `${id}-history`
|
|
223
231
|
}, histories.map(item => option({
|
|
224
232
|
value: item
|
|
225
|
-
})))
|
|
233
|
+
}))),
|
|
234
|
+
button({
|
|
235
|
+
type: "button",
|
|
236
|
+
onclick: action_clear
|
|
237
|
+
}, "クリア")
|
|
226
238
|
];
|
|
227
239
|
return afterRender
|
|
228
240
|
? afterRender(state, localState, vnode)
|