Comments (1)
Hey bro, I looked at your question, compare it with this code
https://github.com/nuxt/ui/blob/dev/docs/components/content/examples/FormExampleElements.vue
As you can see there is only one submit button on the form, the clear button calls a separate function
By closely observing the function of the component that makes the emit, we can see that the way it was done, it is impossible to know which of the buttons were clicked. so currently the component does not have support to do this
Submit Function in https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Form.vue#L129
async function onSubmit (payload: Event) {
const event = payload as SubmitEvent
try {
if (props.validateOn?.includes('submit')) {
await validate()
}
const submitEvent: FormSubmitEvent = {
...event,
data: props.state
}
emit('submit', submitEvent)
} catch (error) {
if (!(error instanceof FormException)) {
throw error
}
const errorEvent: FormErrorEvent = {
...event,
errors: errors.value.map((err) => ({
...err,
id: inputs.value[err.path]
}))
}
emit('error', errorEvent)
}
}
from ui.
Related Issues (20)
- Type issue with colors/variant in app.config.ts
- Default loading icon is not set on SelectMenu from app config HOT 2
- UTable Expandable questions? HOT 2
- Popover close-prevented HOT 3
- USelectMenu :option-attribute does not handle nested objects
- Default props HOT 1
- Module @nuxt/ui is disabled due to incompatibility issues HOT 4
- Expected styles from a private modules are missing in the production client bundle
- UCarousel with Arrows enabled causes Hydration Attribute Mismatch
- Overflow probem with SelectMenu inside a table HOT 5
- [InputMenu/Select/SelectMenu] Missing `arrow` prop implementation
- [InputMenu/SelectMenu] Combobox `default-value` does not seem to work
- [Slider] Handle tooltip around thumb
- Migrate to Reka UI, the new Radix Vue
- [CommandPalette] Generics not working well with items inside groups
- "UDropdown": Toggle NOT Working in Mobile. click event & touchstart event neutralize each other. HOT 1
- How to add localization?
- :ui prop typescript error with 'strategy' as a string HOT 2
- Migration to `@nuxt/content` v3
- How to use css variables defined in css file in UI HOT 9
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 ui.