mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-10 17:38:41 +00:00
23 lines
400 B
JavaScript
23 lines
400 B
JavaScript
/**
|
|
* Clear datalist.
|
|
*
|
|
* @param {{id:string}} action Message data
|
|
* @param {function} callback Callback
|
|
*
|
|
* @since 1.0.0
|
|
*/
|
|
export function datalistClear (action, callback)
|
|
{
|
|
'use strict';
|
|
|
|
const e = document.getElementById(action.id);
|
|
|
|
while (e.firstChild) {
|
|
e.removeChild(e.firstChild);
|
|
}
|
|
|
|
if (typeof callback === 'function') {
|
|
callback();
|
|
}
|
|
};
|