removed lodash and axios
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { createEventDispatcher, getContext } from "svelte";
|
||||
import { debounce } from "lodash";
|
||||
import { apiGet, debounce } from "../../../helpers";
|
||||
|
||||
const channel = getContext("channel");
|
||||
const dispatch = createEventDispatcher();
|
||||
@@ -12,17 +12,16 @@
|
||||
$: searchOptions = [];
|
||||
|
||||
const updateResults = debounce((e) => {
|
||||
axios
|
||||
.get(channel.lucentUrl + "/records/suggestions", {
|
||||
params: {
|
||||
schema: field.collections[0],
|
||||
field: "search",
|
||||
value: search,
|
||||
ui: "search",
|
||||
},
|
||||
})
|
||||
apiGet(channel.lucentUrl + "/records/suggestions", {
|
||||
params: {
|
||||
schema: field.collections[0],
|
||||
field: "search",
|
||||
value: search,
|
||||
ui: "search",
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
searchOptions = response.data;
|
||||
searchOptions = response;
|
||||
})
|
||||
.catch((error) => {
|
||||
searchOptions = [];
|
||||
|
||||
Reference in New Issue
Block a user