# CHANGELOG ## 2.37.3 ### Fixes - Fix `n-split` has no color if it's not used in a card. ## 2.37.2 ### Fixes - `n-data-table`'s `downloadCsv` method will export selection & expand column. ## 2.37.1 ### Fixes - Click clear button on components with popup may trigger reopen behaviors. - Fix `n-form`'s `validate` returned `Promise` may not `resolve`. ### Features - `n-collapse` adds `trigger-areas` prop. - `n-date-picker`'s `is-date-disabled` callback prop supports get detail info of date/year/month/quarter button as parameter, closes [#4649](https://github.com/tusen-ai/naive-ui/issues/4649). - `n-auto-complete` adds `empty` slot. - `n-auto-complete` adds `show-empty` prop. ## 2.37.0 ### Breaking Changes - `module` prop in `package.json` is changed from `es/index.js` to `es/index.mjs` ### Fixes - Fix `n-space` vnode reuse problem caused by filtering out comment nodes of slot, closes [#5136](https://github.com/tusen-ai/naive-ui/issues/5136). - Fix `n-data-table`'s prop `pagination`'s `default-page-size` and `default-page` not work in uncontrolled mode, closes [#5201](https://github.com/tusen-ai/naive-ui/issues/5201). - Fix `n-time-picker` formatting (format="HH: mm: ss. SSS") preventing modification of milliseconds in the edit box, closes [#5224](https://github.com/tusen-ai/naive-ui/issues/5224). - Fix `n-notification` notification clips out of screen when screen width is less than 400px wide. - Fix `n-carousel` transition effect incorrect when using the `slide` effect in loop mode with only two elements, closes [#4323](https://github.com/tusen-ai/naive-ui/issues/4323). - Fix `n-carousel` trigger incorrect `current-index` value on arrow button click with single image, closes [#5130](https://github.com/tusen-ai/naive-ui/issues/5130). - Fix `n-upload-trigger` in directory drag mode with a lot of files, some of the files are not read. - Fix `n-dynamic-tags`'s abnormal behavior when using keyboard to trigger add button, closes [#5077](https://github.com/tusen-ai/naive-ui/issues/5077). - Fix `n-tree` leaf node line color. - Fix `n-collapse-item` cursor pointer to correct element, closes [#5482](https://github.com/tusen-ai/naive-ui/issues/5482). - Fix `n-data-table` throws error if summary config has empty column. - Fix `n-drawer`'s `on-mask-click` may be called multiple times. - Fix `n-tree`'s `data` When the data source 'data' switches several times according to a certain scene, some logic of animation processing can cause errors in rendering the displayed data, closes [#5217](https://github.com/tusen-ai/naive-ui/issues/5217) - Fix `n-radio` value's native input element's checked value is not updated, closes [#5184](https://github.com/tusen-ai/naive-ui/issues/5184). - Fix `n-data-table` height incorrect when set `min-height` in empty state,closes [#5108](https://github.com/tusen-ai/naive-ui/issues/5108). - Fix `n-tabs`'s bar not hidden when `value` is set manually to the value other than the children `n-tab`s, closes [#5100](https://github.com/tusen-ai/naive-ui/issues/5100). - Fix `n-spin` abnormal animation, closes [#3556](https://github.com/tusen-ai/naive-ui/issues/3556). - Fix `n-avatar`'s lazy loading and `fallback-src` prop not working when load error in lazy, closes [#5007](https://github.com/tusen-ai/naive-ui/issues/5007). - Fix `n-split` has no color if it's not used in a card. - Fix `n-card` `footer-class` prop not working. - Fix `n-tabs` may miss over-scroll shadow if `placement` is `'left'` or `'right'`. - Fix `n-date-picker` with range type can input start time that is later than end time, closes [#5544](https://github.com/tusen-ai/naive-ui/issues/5544). ### Features - 🌟 Adds `n-flex` component. - 🌟 `n-date-picker`'s `type` prop supports `'week'`. - 🌟 `n-data-table` adds `downloadCsv` method, closes [#4260](https://github.com/tusen-ai/naive-ui/issues/4260). - 🌟 `n-date-picker` adds `month-format`, `year-format` and `quarter-format` props, closes [#4891](https://github.com/tusen-ai/naive-ui/issues/4891). - 🌟 `n-tree` adds `override-default-node-click-behavior` prop. - 🌟 `n-tree-select` adds `override-default-node-click-behavior` prop. - `n-space` adds `reverse` prop. - `n-input` adds `clear` method, closes [#5423](https://github.com/tusen-ai/naive-ui/issues/5423). - `n-time-picker` adds `'clear'` action, closes [#5334](https://github.com/tusen-ai/naive-ui/issues/5334). - `n-select` supports RTL. - `n-data-table` supports RTL. - `n-dialog` supports RTL. - `n-date-picker` adds `on-prev-month` `on-next-month` `on-prev-year` `on-next-year` prop, closes [#5350](https://github.com/tusen-ai/naive-ui/issues/5350). - `n-input-number` adds `input-props` prop, closes [#5450](https://github.com/tusen-ai/naive-ui/issues/5450). - Update `ruRU` locale. - `n-drawer` adds `content-class` prop. - `n-drawer-content` adds `body-class` `body-content-class` `footer-class` and `header-class` props. - `n-tree` adds multiple `scrollTo` configurations. - `n-form` adds `level` property from `FormItemRule` to show abnormal values but not block submit. - `n-cascader` adds `ellipsis-tag-popover-props` prop. - `n-select` adds `ellipsis-tag-popover-props` prop. - `n-tree-select` adds `ellipsis-tag-popover-props` prop. - `n-avatar-group` adds `expand-on-hover` prop. - `n-tabs` adds `tab-class`, `add-tab-style` and `add-tab-class` props. - `n-pagination` adds `show-quick-jump-dropdown` prop, closes [#5251](https://github.com/tusen-ai/naive-ui/issues/5251). ## 2.36.0 ### Fixes - Fix `n-tree` unexposed line color variable `--n-line-color`, closes [#5339](https://github.com/tusen-ai/naive-ui/issues/5339). - Fix `n-tree` The style of the selected node is not displayed in the case of 'disabled'. - Fix `n-tree` on `virtual-scroll` empty data placeholder lost problem. - Fix `n-watermark` won't clear it's content when `content` prop is set to empty. - Fix `n-tree` use `render-switcher-icon` prop to customize switcher icon will cause node selection, closes [#5380](https://github.com/tusen-ai/naive-ui/issues/5380). - Fix `n-input` will display the password reveal button by default when the `type` is set to `password`. Starting with Microsoft Edge browser Version 87. closes [#5384](https://github.com/tusen-ai/naive-ui/issues/5384). - Fix `n-radio-button` css var `buttonColor` not working. - Fix `n-input` not display vertical scrollbar when `type` is `textarea` and the inline theme is disabled, closes [#5418](https://github.com/tusen-ai/naive-ui/issues/5418). - Fix if `inline-theme-disabled` is set, custom color whose params include decimal won't work in `n-tag`, `n-avatar`, `n-badge`, `n-button`, `n-rate`. - Fix `n-tabs`'s border height in `vertical` mode. - Fix `n-tree`'s node's hover color has higher priority than selected color in `block-line` mode. - Fix `n-tree` click expand switch causes checkbox being checked. ### Features - `n-tree` adds `treeGetClickTarget` method to get click target of node click event, closes [#5375](https://github.com/tusen-ai/naive-ui/issues/5375). - `n-space` adds `item-class` prop. - `n-layout` adds `content-class` prop. - `n-layout-sider` adds `collapsed-trigger-class` and `trigger-class` props. - `n-spin` adds `content-class` and `content-style` props. - `n-popover` adds `arrow-class`, `arrow-wrapper-class`, `arrow-wrapper-style`, `content-class`, `footer-class` and `header-class` props. - `n-notification-provider` adds `container-class` prop. - `n-message-provider` adds `container-class` prop. - `n-loading-bar-provider` adds `container-class` prop. - `n-thing` adds `content-class` and `description-class` props. - `n-card` adds `content-class`, `footer-class`, `header-class` and `header-extra-class` props. - `n-descriptions` adds `content-class` and `label-class` props. - `n-upload` adds `file-list-class` and `trigger-class` props. - `n-dynamic-tags` adds `input-class` and `tag-class` props. - `n-dynamic-input` adds `item-class` prop. - `n-slider` adds `on-dragstart` `on-dragend` prop, closes [#5365](https://github.com/tusen-ai/naive-ui/issues/5365). - `n-dialog` adds `close` slot. - `n-equation` export the `EquationProps` type. - `n-popselect` adds `header` slot. - `n-tree-select` adds `watch-props` prop. - Adds `n-split` component, closes [#3557](https://github.com/tusen-ai/naive-ui/issues/3557). - Adds `n-virtual-list` component. - Adds `n-qr-code` component, closes [#2535](https://github.com/tusen-ai/naive-ui/issues/2535). - `n-menu` add `responsive` prop, it will collapse overflow menu items in horizontal mode. - `n-menu` add `deriveResponsiveState` method. ## 2.35.0 ### Breaking Changes - `n-input`'s `suffix` to the back of `loading`, close [#4685](https://github.com/tusen-ai/naive-ui/issues/4685). - Fix `n-log`'s `silent` attribute spelling problem, closes [#4875](https://github.com/tusen-ai/naive-ui/issues/4875). ### Fixes - Fix `n-radio` export `radioProps` dosen't not includes `theme-overrides`. - Fix `n-description-item`'s `span` doesn't work when `n-descriptions`'s `label-placement` is `'top'` if there's only single line, closes [#4874](https://github.com/tusen-ai/naive-ui/issues/4874). - Fix `n-upload`'s `data` prop type can't include `Blob` element. - Fix `n-select` allows option to be created with existed label, closes [#4703](https://github.com/tusen-ai/naive-ui/issues/4703) - Fix `n-upload`'s `render-icon` prop's type. - Fix `n-auto-complete`'s `onSelect` type, closes [#4617](https://github.com/tusen-ai/naive-ui/issues/4617). - Fix `n-grid-item`'s suffix prop won't work with responsive config, closes [#4635](https://github.com/tusen-ai/naive-ui/issues/4635) - Fix `n-tabs`'s `paneWrapperStyle` prop missing height after animation - Fix `n-tree` should check all items instead of uncheck all if indeterminate checkbox is clicked, closes [#4941](https://github.com/tusen-ai/naive-ui/issues/4941). - Fix the Popover was not displayed when the `n-internal-selection` was disabled and the mouse was moved over the '+n' tag. closes [#4789](https://github.com/tusen-ai/naive-ui/issues/4789) - Fix `n-input` doesn't display the vertical scroll bar when `type` is `textarea`, closes [#4570](https://github.com/tusen-ai/naive-ui/issues/4570). - Fix `n-alert`'s content style problem, when there is no title and use closable, closes [#4588](https://github.com/tusen-ai/naive-ui/issues/4588). - Fix `n-select`'s `empty` slot action then it is an interactive component, closes [#4700](https://github.com/tusen-ai/naive-ui/issues/4700). - Fix `n-data-table` header and body's scrolling are not sync when using the keyboard, closes [#3941](https://github.com/tusen-ai/naive-ui/issues/3941). - Fix `n-data-table` drag column causing text selection in Safari, closes [#4957](https://github.com/tusen-ai/naive-ui/issues/4957). - Fix `n-data-table` ellipsis content in table cell would wrap with expand button when using tree data, closes [#3755](https://github.com/tusen-ai/naive-ui/issues/3755). - Fix `useLoadingBar` can't finish loading when called `finish` method, closes [#4965](https://github.com/tusen-ai/naive-ui/issues/4965). - Fix `n-select` can still trigger focus and blur event in the disabled state, closes [#4454](https://github.com/tusen-ai/naive-ui/issues/4454). - Fix `n-steps` may have line wrap issue if step is more than 9. - Fix `n-grid` v-show reports errors when switching multiple times, closes [#4422](https://github.com/tusen-ai/naive-ui/issues/4422). - Fix `n-tree`'s `TreeOption`'s `checkboxDisabled` prop doesn't work when `check-on-click` is `true`. - Fix rapid clicks on `n-date-input`'s buttons triggering a text select for the rest of the website. - Fix `n-auto-complete`'s autocomplete menu's unexpected open when clicking the clear icon with the input not focused, closes [#4658](https://github.com/tusen-ai/naive-ui/issues/4658). - Fix `n-input`'s `on-keyup` prop type, closes [#5101](https://github.com/tusen-ai/naive-ui/issues/5101) - Fix `n-data-table`'s default sorter to place null values at the very top or bottom, closes [#5281](https://github.com/tusen-ai/naive-ui/issues/5281). - Fix `n-popconfirm`'s action button should not be triggered multiple times,closes [#4687](https://github.com/tusen-ai/naive-ui/issues/4687). ### Features - `n-drawer` adds `max-height`, `min-height`, `max-width` and `max-width` props. - `n-progress` supports indicator slot when the `indicator-placement` is set to `'inside'` in the `'line'` type, closes [#4888](https://github.com/tusen-ai/naive-ui/issues/4888). - `n-image-preview` adds `downaload` button, closes [#4302](https://github.com/tusen-ai/naive-ui/issues/4302). - `n-transfer` adds `select-all-text` and `clear-text` prop, closes [#4910](https://github.com/tusen-ai/naive-ui/issues/4910). - `n-tree` adds `scrollbar-props` prop, closes [#4021](https://github.com/tusen-ai/naive-ui/issues/4666). - `n-select` adds `focusInput` `blurInput` methods. - `n-tree-select` adds `focusInput` `blurInput` methods. - `n-image-group` adds `on-preview-prev` `on-preview-next` prop. - `n-tree` adds `show-line` prop, closes [#3796](https://github.com/tusen-ai/naive-ui/issues/3796), [#4554](https://github.com/tusen-ai/naive-ui/pull/4554). - `n-tree` adds node information for `render-switcher-icon` props, closes [#4815](https://github.com/tusen-ai/naive-ui/issues/4815). - `n-input-number` export the `select` method. - `n-data-table` adds `n-data-table-tr--expanded` class to expanded rows, and `n-data-table-tr n-data-table-tr--expand` class to the additional row, closes [#4420](https://github.com/tusen-ai/naive-ui/issues/4420). - `n-spin` adds `delay` prop. - Adds `n-performant-ellipsis` component. - `DataTableBaseColumn` adds `ellipsisComponent` prop. ### i18n - Update `zhTW` locale. - Add `svSE` locale. - Update `jaJP` locale. ## 2.34.4 ### Fixes - Fix `n-notification`'s `description` does not wrap when there is English, closes [#4609](https://github.com/tusen-ai/naive-ui/issues/4609). - Fix `n-dynamic-input` can't access `value[index]` by `index` passed in `on-remove` prop. - Fix `n-dynamic-input` doesn't return correct `index` in `on-create` callback. - Fix `trTR` i18n, closes [#4231](https://github.com/tusen-ai/naive-ui/issues/4231). - Fix `n-input`'s show password icon is offset when use both `password` and `disabled`, closes [#4364](https://github.com/tusen-ai/naive-ui/issues/4364). - Fix `n-image` set `fallback-src` prop and lazy loading dosen't work, closes[#4480](https://github.com/tusen-ai/naive-ui/issues/4480). - Fix `n-upload` warning cause by extraneous non-props attributes were passed to vue component `TransitionGroup` but could not be automatically inherited, closes [#4447](https://github.com/tusen-ai/naive-ui/issues/4447). - Fix `n-menu` `show` `default` attribute spelling problem, closes [#4750](https://github.com/tusen-ai/naive-ui/issues/4750). - Fix `n-icon-wrapper`'s theme error, closes [#4768](https://github.com/tusen-ai/naive-ui/issues/4768). ### Feats - `n-dynamic-input` adds `action` slot, closes [#3981](https://github.com/tusen-ai/naive-ui/issues/3981). - `n-dynamic-input` add `disabled` prop, closes [#4055](https://github.com/tusen-ai/naive-ui/issues/4055). - `n-data-table` adds `titleAlign` prop, closes [#3954](https://github.com/tusen-ai/naive-ui/issues/3954). - `n-rate` exposes `index` in the default slot, closes [#4413](https://github.com/tusen-ai/naive-ui/issues/4413). - `n-scrollbar` adds `size` prop, closes [#3896](https://github.com/tusen-ai/naive-ui/issues/3896). - `n-data-table`'s `render-expand-icon` add `expanded` param, closes [#4439](https://github.com/tusen-ai/naive-ui/issues/4439). - `n-tabs` adds `pane-wrapper-class` `pane-wrapper-style` prop. - `n-collapse` adds `titlePadding` theme variable, closes [#4728](https://github.com/tusen-ai/naive-ui/issues/4728). - `n-tabs` adds `placement` prop. ### i18n - Update `zhTW` locale. - Add `faIR` locale. ## 2.34.3 ### Fixes - Fix `n-progress`'s `indicator-text-color` prop doesn't work when `indicator-placement` is `'inside'`. - Fix `n-image` error while operating the previewed image, 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). - Fix `n-ellipsis` cannot be closed when using `keep-alive`, closes [#4079](https://github.com/tusen-ai/naive-ui/issues/4079). - Fix `n-upload` doesn't show thumbnail for file with image type file name, closes [#4198](https://github.com/tusen-ai/naive-ui/issues/4198). - Fix `n-input` style bug of tiny size with autosize prop, closes [#4167](https://github.com/tusen-ai/naive-ui/issues/4167). - Fix `n-image` & `n-avatar` in `lazy` mode, after setting the `intersection-observer-options` `rootMargin` attribute, the preload does not take effect. ### Feats - `n-tree` adds `get-children` prop, closes [#4128](https://github.com/tusen-ai/naive-ui/issues/4128). - `n-badge` adds `offset` prop, closes [#4149](https://github.com/tusen-ai/naive-ui/issues/4149). - `n-card` adds `tag` prop. - demos can now use `