Comments (2)
Yeah, same here. I noticed that issue, and now I can't develop my app further because of it. The problem appears to be caused by putting ft.AutoComplete
inside an ft.Row
. You can put it inside an ft.ResponsiveRow
, but it will stretch and expand, leaving no space for the other elements in the same row.
After experimenting more with the widget, I found that you can place it as a child of ft.Stack
and change the width of the stack to the desired size. Then, wrap everything inside ft.ResponsiveRow
, and it sort of works, but the suggestion's dropdown will not follow the stack size or the widget width.
However, there's a bigger problem: Sadly, ft.AutoComplete
is not supported yet on Android or iOS. I don't know why, maybe the widget is still under development.
from flet.
By the way, this is how I did it if that can help your case:
But don't close The Issue because the problems are not fixed yet.
import flet as ft
def main(page: ft.Page):
list_example = ["one 1", "two 2", "three 3"]
auto_complete = ft.AutoComplete(
suggestions=[ft.AutoCompleteSuggestion(value=i) for i in list_example],
on_select=lambda e: print(e.selection),
)
text_file = ft.TextField(width=400)
page.add(ft.Row([ft.Column([text_file, ft.Stack(controls=[auto_complete],width=400)]),
ft.Column([text_file, ft.Stack(controls=[auto_complete],width=400)])]))
ft.app(target=main)
from flet.
Related Issues (20)
- Page Router does not corespond with graphical
- Auto-update of Controls
- prior working app stopped working with assertionerrors HOT 1
- deleting sqlite data
- flet build apk error HOT 1
- Feature Request: Set cursor in TextField
- Interop between Flutter and Python using Dart NativeAPI and FFI
- flet
- flet build apk error using flet 0.22.0
- how add netmiko to flet app HOT 2
- ModuleNotFound in apk build
- `pyproject.toml` for Flet project metadata, running and building settings
- fullscreen mode fail on linux
- Global update for type hinting: `IconStr` enum and `ColorStr` type alias HOT 4
- Rename `Page.navigation_bar` to `Page.bar` HOT 4
- Introduce `Service` for non-visual controls like Audio, Geolocator, etc.
- `flutter run` with android debug device gave out this error HOT 1
- When I close the AlertDialog,the "page.on_view_pop" will run HOT 3
- ModuleNotFoundError: No module named 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 flet.