Comments (8)
type='select' should address your needs. Its prop "options" supports the async function, or your function return a promise, something like this:
<vue-excel-column field="x" label="Test" type="select" :options="getXOptions" />
methods: {
async getXOptions () {
const result = await getXFromServer()
return result
}
}
from vue-excel-editor.
thanks @cscan, but If I want to type something and make async filter, what I have to do?
from vue-excel-editor.
type="select" supports typing. The dropdown list depends on your async function. Component will pass the edit value and record to the function, you may try this:
methods: {
async getXOptions (val, rec) {
if (val === '') return []
const result = await getXFromServer(val) // val contains what you typed
return result
}
}
from vue-excel-editor.
awesome, thank you very much
from vue-excel-editor.
it works, but why is so slow setting the value in the grid
from vue-excel-editor.
is there any possibility to set a debounce function in async getXOptions (val, rec)
from vue-excel-editor.
Slow because of the await. You may add some caching to speed the things up.
from vue-excel-editor.
I'm trying to do something like like this, but i'm getting
list.slice is not a function
async getXOptions () { if (val === '') return [] return debounce(async () => await getXFromServer(), 500) }
from vue-excel-editor.
Related Issues (20)
- How do i get the rows? HOT 2
- Cannot use import statement outside a module HOT 1
- Filtering can not multi select HOT 2
- How to add an image field? HOT 1
- Copy paste should create new rows and columns HOT 2
- excel formula support HOT 1
- Sticky Headers HOT 2
- Select multiple cell and column HOT 1
- formulas in cells HOT 1
- Cell's type does not register correctly in the Excel file cell's data type format settings HOT 1
- Display the table in a CSV format without exporting it HOT 2
- header-color if item.num is ? HOT 1
- Revalidating Columns on a button click HOT 1
- Poor UX with ctrl-a : & disabling row-selection HOT 1
- custom column header HOT 1
- Export Table on Android/Ios Webview HOT 1
- Scroll up/down issue from 1.4 HOT 2
- Paste from excel - an example HOT 1
- no default exports in vuedraggable and xlsx.js HOT 2
- Nuxt 2 cannot use import statement outside a module
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-excel-editor.