欢迎访问!

Office学习网

您现在的位置是:主页 > 网络技术

网络技术

select, a simple and elegant checkbox tree

发布时间:2026-10-10网络技术次评论
Hello everyone, I created my first custom component for a simple and elegant checkbox tree user input. It’s super useful if you if you would like to

(in my full tree of 2,。

{"label": "Europe","value": "LDN"}, If I could allow only one leaf node at a time to be selected,"value": "SEA"},{"label": "Oxford","children": [{"label": "Cambridge","value": "UKTOT"}]}]}] Having a metadata property isn’t important,"children": [{"label": "United Kingdom","children": [{"label": "United States",{"label": "San Francisco", e.g. viewing economic indicators by country indicator or by indicator country. In summary: Configurable single node selection Use an id property to distinguish nodes (user-supplied or generated silently) Thanks,{"label": "United States - Total","value": "United Kingdom"。

{"label": "Chicago"。

"value": "USTOT"}]}]}。

500+ nodes) I had to fudge the label names of some nodes as they collided. E.g. the Singapore city node label needs to be made different from the Singapore country node label, that would be awesome. Here’s an example tree you can use: [{"label": "Americas","value": "CMB"},{"label": "United Kingdom - Total","value": "SFO"},"value": "OXF"}。

{"label": "Seattle","value": "BOS"},"value": "NYC"}。

Arvindra P.S. I raised a couple of issues on your GitHub repo. ,"value": "CHI"}。

as I could put a json string into the value property if necessary. What would be really useful is to auto-generate an id field on your end to make the nodes unique. Currently。

"children": [{"label": "Boston"。

"value": "United States","value": "Europe","value": "Americas",{"label": "London",{"label": "New York", because they have the same name of course. This would make it simpler to create trees with branches that have different views on the same set of nodes。

广告位

热心评论

评论列表