-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: state autocompletion for builder settings fields #383
Conversation
<script setup lang="ts"> | ||
import { inject, ref, nextTick } from "vue"; | ||
import injectionKeys from "../injectionKeys"; | ||
import Fuse from "fuse.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unpacked size on npm
looks very chunky (>400kb). How big is the file actually being loaded?
I'd argue we don't need fuzzy search as it's programming, not an e-commerce product search. But keen to discuss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on avoiding library just for fuzzy research. I would recommand to write a utility function to perform fuzzy research if we need it. The algorithme looks simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe vite is minimizing it by itself? 🤔
@@ -38,16 +43,16 @@ | |||
</div> | |||
</div> | |||
<div class="formAdd"> | |||
<input | |||
<BuilderTemplateInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can use references to state here, can you please check?
ref="assistedKeyEl" | ||
v-model="formAdd.key" | ||
type="text" | ||
v-model:value="formAdd.key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use v-model
with BuilderTemplateInput
you'll need to use defineModel
(at least that's what's documented)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I used is described here:
https://vuejs.org/guide/components/v-model#under-the-hood
I needed a little more control of update events
No description provided.