Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import { h } from '/js/src/index.js';
* @param {object} [configuration] filter configuration
* @param {string[]} [configuration.classes] classes to apply to the filter input
* @param {string} [configuration.placeholder] placeholder of the filter input
* @param {Function} [configuration.onkeyup] function called on key up in the filter input
* @return {Component} the filter
*/
export const rawTextFilter = (filterModel, configuration) => {
const { classes = [], placeholder = '', id } = configuration || {};
const { classes = [], placeholder = '', id, onkeyup } = configuration || {};
return h(
'input',
{
Expand All @@ -34,6 +35,7 @@ export const rawTextFilter = (filterModel, configuration) => {
placeholder: placeholder,
oninput: (e) => filterModel.update(e.target.value),
onchange: (e) => filterModel.update(e.target.value, true),
onkeyup,
},
);
};
Loading