[Bug] setDropDownMenuHighlight 设置选中态展示异常
Version
^0.17.10
Link to Minimal Reproduction
https://visactor.io/vtable/guide/components/dropdown
Steps to Reproduce
Current Behavior
dropdown_menu_click 监听事件 setDropDownMenuHighlight([cells]) 设置选中态 其他选中态异常
Expected Behavior
其他选中态 取消选中
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
let tableInstance; fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json') .then((res) => res.json()) .then((data) => {
const columns =[ { "field": "Order ID", "title": "Order I121D", "width": "auto" }, { "field": "Product Name", "title": "Product Name", "width": "auto", style: { textAlign: 'left', textBaseline: 'middle', textOverflow: 'ellipsis', color: '#F66', fontSize: 14, fontFamily: 'Arial', fontWeight: 'bold', fontVariant: 'small-caps', fontStyle: 'italic' } }, { "field": "Category", "title": "Category", "width": "auto" }, { "field": "Sub-Category", "title": "Sub-Category", "width": "auto" }, { "field": "Region", "title": "Region", "width": "auto" }, { "field": "City", "title": "City", "width": "auto" }, { "field": "Order Date", "title": "Order Date", "width": "auto" }, { "field": "Quantity", "title": "Quantity", "width": "auto" }, { "field": "Sales", "title": "Sales", "width": "auto" }, { "field": "Profit", "title": "Profit", "width": "auto" } ];
const option = {
container: document.getElementById(CONTAINER_ID),
records:data,
columns,
widthMode:'standard',
theme:VTable.themes.DEFAULT,
menu: {
renderMode: 'html',
defaultHeaderMenuItems: [
{
text: '升序排序',
icon: {
svg: '<svg width="14" height="14" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
}
}; tableInstance = new VTable.ListTable(option); tableInstance.on('dropdown_menu_click', (args) => { const cells = { col:args.col, row:args.row, field: args.field, menuKey: args.menuKey, }; tableInstance.setDropDownMenuHighlight([cells]); }); window['tableInstance'] = tableInstance; })
完整配置项
另外一列的图标高亮状态没有清除 ,目前用户结合setRecords接口也就一并刷新了场景树, 所以不阻碍