Add option to set limit in all-parameters comp.
This commit is contained in:
1 parent
8d8e122633
commit
c950c73e76
1 file changed
+3
-1
@@ -55,6 +55,8 @@ const component: ClosureComponent = (): Component => {
|
|||||||
view: (vnode) => {
|
view: (vnode) => {
|
||||||
const device = vnode.attrs["device"];
|
const device = vnode.attrs["device"];
|
||||||
|
|
||||||
|
const limit = vnode.attrs["limit"] > 0 ? vnode.attrs["limit"] : 100;
|
||||||
|
|
||||||
const search = m("input", {
|
const search = m("input", {
|
||||||
type: "text",
|
type: "text",
|
||||||
placeholder: "Search parameters",
|
placeholder: "Search parameters",
|
||||||
@@ -86,7 +88,7 @@ const component: ClosureComponent = (): Component => {
|
|||||||
const str = p.value && p.value[0] ? `${k} ${p.value[0]}` : k;
|
const str = p.value && p.value[0] ? `${k} ${p.value[0]}` : k;
|
||||||
if (re && !re.test(str)) continue;
|
if (re && !re.test(str)) continue;
|
||||||
++c;
|
++c;
|
||||||
if (count < 100) filteredKeys.push(k);
|
if (count < limit) filteredKeys.push(k);
|
||||||
}
|
}
|
||||||
count += c;
|
count += c;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user