Comments (5)
If you want to make them line up, try either giving both elements a label or none of them:
with ui.row():
ui.input(value="Input")
ui.select(["Option 1", "Option 2"], value="Option 1")
with ui.row():
ui.input("Input", value="value")
ui.select(["Option 1", "Option 2"], value="Option 1", label="Select")
from nicegui.
Thank you, I feel stupid 🥴
from nicegui.
@chrschorn I just wonder why both elements are well aligned on a plain Quasar page - independent of labels:
<!DOCTYPE html>
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons"
rel="stylesheet"
type="text/css"
/>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quasar.prod.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="q-app">
<div class="row">
<q-input label="Input" model-value="input value" />
<q-select model-value="A" />
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/quasar.umd.prod.js"></script>
<script>
const app = Vue.createApp({ setup: () => {} });
app.use(Quasar);
app.mount("#q-app");
</script>
</body>
</html>
from nicegui.
@falkoschindler oh, I'm not sure what's going on here then. Feel free to reopen the issue.
from nicegui.
@me21 I found my mistake! We can't use auto-closing tags in HTML. Instead we need to write
<div class="row">
<q-input label="Input" model-value="input value"></q-input>
<q-select model-value="A"></q-select>
</div>
This way Quasar yields the same result like NiceGUI. And if you think about it, it makes sense to vertically align the select value in the middle (next to the arrow) if there is no label. If there was no input element, the ui.select
without a label would look strange with a value shifted towards the bottom.
from nicegui.
Related Issues (20)
- ⚠️ `ui.upload` File upload stops at 99.9% HOT 4
- 3D visualization not reliable HOT 15
- From 188c81b on some pages load extremely slowly HOT 9
- I use pyinstaller to generate .exe file find question, how to solve it?
- Setting ui.number min/max property is failing after version nicegui-1.4.19 HOT 1
- When executing the run_method , a KeyError error occurs. HOT 6
- Native mode [Windows] : Stay on top option
- Firefox cannot establish the websocket connection but other browsers and firefox private browsing can. HOT 8
- app.storage.user in unit tests throws error. HOT 1
- confilict with multiprocessing when running in native mode? HOT 1
- Infinite scroll example errors HOT 5
- Nginx subpath example doesn't redirect correctly when navigating to subpage with trailing slash HOT 1
- ui.plotly chart randomly collapses / shrinks HOT 2
- Leaflet always uses the full width
- Troubles while periodically updating the 3D scene HOT 6
- Native mode and resizability of the window HOT 4
- ui.input validation will remain space after it's value was corrected HOT 3
- Select fails to change value on first try. HOT 6
- `run_method` and `getElement` return inconsistent types of elements HOT 1
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 nicegui.