Skip to content

Commit

Permalink
fix(menu): can't override submenu dropdown's trigger by `dropdown-p…
Browse files Browse the repository at this point in the history
…rops`(#4148)

* Fix dropdown trigger getting overriden in NMenu

* Add changelog entry

Co-authored-by: Albert Geantă <[email protected]>
Co-authored-by: 07akioni <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2022
1 parent eb340ae commit 3410434
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

### Fixes

- Fix 'n-image' preview toolbar error, close [#4157](https://github.com/tusen-ai/naive-ui/issues/4157).
- Fix 'n-tree' cannot access 'mergedFilterRef' before initialization error, close [#4134](https://github.com/tusen-ai/naive-ui/issues/4134).
- Fix `n-image` preview toolbar error, closes [#4157](https://github.com/tusen-ai/naive-ui/issues/4157).
- Fix `n-tree` cannot access `mergedFilterRef` before initialization error, closes [#4134](https://github.com/tusen-ai/naive-ui/issues/4134).
- Fix `n-menu` can't override submenu dropdown's `trigger` by `dropdown-props`, closes [#4147](https://github.com/tusen-ai/naive-ui/issues/4147).

## 2.34.2

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- 修复 `n-image` 的预览工具栏报错,关闭 [#4157](https://github.com/tusen-ai/naive-ui/issues/4157)
- 修复 `n-tree``cannot access 'mergedFilterRef' before initialization`报错,关闭 [#4134](https://github.com/tusen-ai/naive-ui/issues/4134)
- 修复 `n-menu` 无法通过 `dropdown-props` 覆盖子菜单 dropdown 的 `trigger`,关闭 [#4147](https://github.com/tusen-ai/naive-ui/issues/4147)

## 2.34.2

Expand Down
2 changes: 1 addition & 1 deletion src/menu/src/Submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export const NSubmenu = defineComponent({
return this.root ? (
<NDropdown
size="large"
trigger="hover"
{...this.menuProps?.dropdownProps}
themeOverrides={this.mergedTheme.peerOverrides.Dropdown}
theme={this.mergedTheme.peers.Dropdown}
Expand All @@ -187,7 +188,6 @@ export const NSubmenu = defineComponent({
optionIconSizeLarge: '18px'
}}
value={this.mergedValue}
trigger="hover"
disabled={!this.dropdownEnabled}
placement={this.dropdownPlacement}
keyField={this.menuProps.keyField}
Expand Down

0 comments on commit 3410434

Please sign in to comment.