Skip to content

Commit

Permalink
Make autocomplete always available
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshiokatsuneo committed Feb 12, 2025
1 parent ec2ca6f commit d4ed0fd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions client/app/pages/queries/hooks/useAutocompleteFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ import { useCallback, useMemo, useState } from "react";
import { reduce } from "lodash";
import localOptions from "@/lib/localOptions";

function calculateTokensCount(schema) {
return reduce(schema, (totalLength, table) => totalLength + table.columns.length, 0);
}

export default function useAutocompleteFlags(schema) {
const isAvailable = useMemo(() => calculateTokensCount(schema) <= 5000, [schema]);
const isAvailable = true;
const [isEnabled, setIsEnabled] = useState(localOptions.get("liveAutocomplete", true));

const toggleAutocomplete = useCallback(state => {
Expand Down

0 comments on commit d4ed0fd

Please sign in to comment.