Comments (9)
I'm pretty sure I was playing around with css for the badge at the time so that would be the cause for any odd appearance to it. If you need it I can try to replicate it but like I said, I switched to a flat tree view which works great for my purpose. I am actually using it as a list control to display a list of vscode installed extensions and it is working just fine for that. That is why I wanted to have the first item selected on startup as I am displaying the first extensions info to the right when the webview initially loads. I was actually able to set it as selected by sending a click like this...
document.querySelector("#extension-tree").shadowRoot.querySelector("div > ul > li:nth-child(1) > div > span").click();
As you suggested, adding treeData[0].selected = true;
to the tree items data seems to work just as well for me and it is much easier to read, so I will use that. I am using an action icon to toggle the selection of extensions with a leading icon for the selection status. I removed the tab control all together as it only had 2 tabs and I realized I can display everything on one page anyways. Here is a quick screenshot of how I'm using this (Still needs a lot of work yet)...
from elements.
It seems to work. The only deceptive thing is that the px values will be converted to percentage values, to keep the same ratio when the table is resized. It seemed like a good idea. I dont't know, maybe it isn't.
from elements.
Strange, does not seem to work for me. No matter what I set them to, they are all evenly spaced, almost like they are all set to auto. No big deal as percentages work just fine for me. Using percentages actually makes more sense for a table anyways, at least in my opinion.
from elements.
Can you create a reproducible example? Which version do you use?
from elements.
I think I know what is causing the issue. I had the table in a tab and this is what I get using '100px'
And using '10%' I get this..
I tried it without the tabs and px is working ok like that.
This was using the example html for Initial Column Widths.
from elements.
I actually switched to using a flat tree to display my items as it seems more appropriate for my purpose. Quick question about the tree element, is there a method to set an item as selected for the initial display? Another related question, when using action buttons is there as option to select the item as well? Currently the item with the clicked action button is not selected.
from elements.
I think I know what is causing the issue. I had the table in a tab and this is what I get using '100px'...
Hi,
Somehow I didn't notice your comment. Thank you for the example, I will try this. That badge looks weird, were you able to fix it? If weren't please show me the HTML markup you used. It should work without any additional css.
from elements.
I actually switched to using a flat tree to display my items as it seems more appropriate for my purpose. Quick question about the tree element, is there a method to set an item as selected for the initial display? Another related question, when using action buttons is there as option to select the item as well? Currently the item with the clicked action button is not selected.
An item can be marked as selected in the tree data, so you should replace the whole tree data with a modified new one. Yes, it sounds hacky and it is. Currentyl, I don't have any better idea.
from elements.
Thank you for your effort. Btw., I want to rewrite the tree component. It will be more flexible than now.
from elements.
Related Issues (20)
- Add header slot to the Collapsible component
- Tree double click expand mode
- Tree action icons and decorations
- Tree custom icons
- `SingleSelect` to have a `invalid` property? HOT 2
- Is that possible add indeterminate attribute to the vscode-checkbox HOT 3
- The data of the Form is not returned as expected HOT 2
- Validation of form elements HOT 3
- Tree item labels enhancement HOT 1
- Make styles Safari compatible
- Unexpected behaviour of vscode-radio and vscode-radio-group components HOT 1
- Using vscode-icon and button with codicon icons with React HOT 2
- Using vscode-tree component and vscode-icon didnit show HOT 2
- Tree: vsc-select event is renamed to vsc-tree-select. - Is returning null HOT 2
- It's not clear how to use the `IconType` HOT 3
- Arrow isn't visible HOT 2
- Deselect tree HOT 6
- Tree item description HOT 7
- Tree item tooltip HOT 6
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 elements.