Comments (3)
This would seem to be unfortunate wording in the docs. If I recall correctly what is supported is TextType
, which is Text | str
. So you can use a Text
Rich renderable, or a string.
from textual.
Yup, that's OK.
It's a bit of a pity though, DataTable seems to work fine with more generic Renderables (and shows the first row of the Table in this case):
from textual.app import App
from textual.widgets import DataTable
from rich.table import Table
class MyApp(App):
def compose(self):
subtab = Table('sub1', 'sub2')
subtab.add_row('it1', 'it2')
tab = DataTable()
tab.add_columns("Head1", "Head2")
tab.add_row(subtab, 'Item2')
yield tab
MyApp().run()
I'm trying to apply customization of the SelectionList Options based on the available width of the list, and it's tricky to do if Renderables aren't allowed.
from textual.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
from textual.
Related Issues (20)
- DataTable inside a TabbedContent/TabPane behaves abnormally. HOT 5
- `MountError: Can't mount widget(s) before <widget> is mounted` with `widgets=()` during dynamic refresh HOT 10
- Initial `Footer` flicker with overlapping key bindings HOT 2
- Emojis in command names HOT 1
- Input templates HOT 1
- `grid-rows: auto` does not consider height for rows that are spanned HOT 1
- Markdown Widget Lagging when Opening Large Files HOT 2
- Focussing a widget inside a tab should switch tabs HOT 4
- Command palette top option should be highlighted by default
- CommandPalette events HOT 2
- DataTable flickers on scrolling using cursor HOT 1
- Crash when using hot-reloading with new hatch CSS rule HOT 1
- `hatch: <type> <colour-name>` results in parsing error HOT 1
- Crash on pushing screen when a toast is active HOT 7
- Style(bgcolor="$success") results in an exception, same with Text("value", "bgcolor: $success") HOT 3
- Add feature: TCSS property font-size HOT 5
- Header Expansion HOT 6
- Color Palete HOT 1
- `pop_screen()` triggering randomly after hoovering buttons under heavy load HOT 13
- The type of dark attribute of class App might be inaccurate. (Reactive[bool] -> bool) HOT 5
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 textual.