Skip to content
Snippets Groups Projects
Commit 8a626d6e authored by Hermann's avatar Hermann
Browse files

fix linter errors

parent 484e68c9
No related branches found
No related tags found
No related merge requests found
......@@ -125,18 +125,14 @@ export class ResourceHandler {
} else {
fullQuery.where = JSON.stringify(searchQuery);
}
} else {
if (query.where) {
fullQuery.where = JSON.stringify(query.where);
}
} else if (query.where) {
fullQuery.where = JSON.stringify(query.where);
}
// add all other keys
queryKeys.filter(key => (key !== 'where' && key !== 'search'))
.forEach((key) => { fullQuery[key] = JSON.stringify(query[key]); });
console.log(fullQuery);
// now we can acutally build the query string
return `?${m.buildQueryString(fullQuery)}`;
}
......
......@@ -10,19 +10,16 @@ import { icons, BackButton, ClearButton, SearchIcon } from './elements';
const createSearchField = () => {
return {
oninit: vnode => {
const value = Stream("");
oninit: (vnode) => {
const value = Stream('');
const setInputState = Stream();
//const clear = () => setInputState()({ value: '', focus: false});
// const clear = () => setInputState()({ value: '', focus: false});
const clear = () => value('');
const leave = () => value('');
vnode.state = {
value,
setInputState,
clear,
leave
value, setInputState, clear, leave,
};
},
view: ({ state, attrs }) => {
......@@ -32,16 +29,14 @@ const createSearchField = () => {
{},
{
textfield: {
label: "Search",
label: 'Search',
onChange: (newState) => {
state.value(newState.value);
state.setInputState(newState.setInputState);
// onChange callback added for result list example:
attrs.onChange && attrs.onChange(newState, state.setInputState);
if (attrs.onChange) attrs.onChange(newState, state.setInputState);
},
value,
// incoming label and defaultValue added for result list example:
label: attrs.label || "Search",
defaultValue: attrs.defaultValue,
},
buttons: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment