New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 fix: refresh model config form & mobile footer button lost #2318
Conversation
@sxjeru is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
👍 @sxjeru Thank you for raising your pull request and contributing to our Community |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2318 +/- ##
=======================================
Coverage 92.89% 92.89%
=======================================
Files 297 297
Lines 16928 16928
Branches 1963 1963
=======================================
Hits 15726 15726
Misses 1202 1202 ☔ View full report in Codecov by Sentry. |
可能更好的方式是给 modal 设定 一个 key? 当 key 不一样的自动创建新的modal,就不会有这个问题了? |
Maybe a better way is to set a key for the modal? When the key is different, a new modal is automatically created, so there won't be this problem? |
看来 Ant Design 已经考虑到了。 |
// When is used with Form, setting destroyOnClose will not destroy the form field data when Modal is closed. You need to set .It seems Ant Design has thought of this. |
open={open} | ||
title={t('llm.customModelCards.modelConfig.modalTitle')} | ||
zIndex={1051} // Select is 1050 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不知为何,明明 Drawer 也有 zIndex 属性,但参数传不到,Antd Modal 倒是拿到了。
想必与此处相关:https://github.com/lobehub/lobe-ui/blob/master/src/Modal/index.tsx
❤️ Great PR @sxjeru ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 0.159.4](v0.159.3...v0.159.4) <sup>Released on **2024-05-14**</sup> #### 🐛 Bug Fixes - **misc**: Refresh model config form & mobile footer button lost. #### 💄 Styles - **misc**: Add GPT-4o model, update perplexity models, updates 01.AI model list. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Refresh model config form & mobile footer button lost, closes [#2318](#2318) [#2319](#2319) [#1811](#1811) ([eadcefc](eadcefc)) #### Styles * **misc**: Add GPT-4o model, closes [#2481](#2481) ([ae6a03f](ae6a03f)) * **misc**: Update perplexity models, closes [#2469](#2469) ([488cde7](488cde7)) * **misc**: Updates 01.AI model list, closes [#2471](#2471) ([f28711a](f28711a)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 0.159.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…#2318) * fix form not update * Update ModelConfigModal.tsx * fix lobehub#2319 * react/jsx-sort-props * lobehub#1811 * onCancel closeModal * zIndex
### [Version 0.159.4](lobehub/lobe-chat@v0.159.3...v0.159.4) <sup>Released on **2024-05-14**</sup> #### 🐛 Bug Fixes - **misc**: Refresh model config form & mobile footer button lost. #### 💄 Styles - **misc**: Add GPT-4o model, update perplexity models, updates 01.AI model list. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Refresh model config form & mobile footer button lost, closes [lobehub#2318](lobehub#2318) [lobehub#2319](lobehub#2319) [lobehub#1811](lobehub#1811) ([eadcefc](lobehub@eadcefc)) #### Styles * **misc**: Add GPT-4o model, closes [lobehub#2481](lobehub#2481) ([ae6a03f](lobehub@ae6a03f)) * **misc**: Update perplexity models, closes [lobehub#2469](lobehub#2469) ([488cde7](lobehub@488cde7)) * **misc**: Updates 01.AI model list, closes [lobehub#2471](lobehub#2471) ([f28711a](lobehub@f28711a)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
### [Version 1.39.2](v1.39.1...v1.39.2) <sup>Released on **2024-05-15**</sup> #### 🐛 Bug Fixes - **misc**: Fix agent config on page init, fix retry issue when hide page, login button not show on user panel, refresh model config form & mobile footer button lost. #### 💄 Styles - **misc**: Add GPT-4o model, fix scroll and expand, update perplexity models, updates 01.AI model list. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix agent config on page init, closes [lobehub#2506](https://github.com/bentwnghk/lobe-chat/issues/2506) ([90e742d](90e742d)) * **misc**: Fix retry issue when hide page, closes [lobehub#2503](https://github.com/bentwnghk/lobe-chat/issues/2503) ([24489bc](24489bc)) * **misc**: Login button not show on user panel, closes [lobehub#2496](https://github.com/bentwnghk/lobe-chat/issues/2496) ([39637fb](39637fb)) * **misc**: Refresh model config form & mobile footer button lost, closes [lobehub#2318](https://github.com/bentwnghk/lobe-chat/issues/2318) [lobehub#2319](https://github.com/bentwnghk/lobe-chat/issues/2319) [lobehub#1811](https://github.com/bentwnghk/lobe-chat/issues/1811) ([eadcefc](eadcefc)) #### Styles * **misc**: Add GPT-4o model, closes [lobehub#2481](https://github.com/bentwnghk/lobe-chat/issues/2481) ([ae6a03f](ae6a03f)) * **misc**: Fix scroll and expand, closes [lobehub#2470](https://github.com/bentwnghk/lobe-chat/issues/2470) ([8b1202a](8b1202a)) * **misc**: Update perplexity models, closes [lobehub#2469](https://github.com/bentwnghk/lobe-chat/issues/2469) ([488cde7](488cde7)) * **misc**: Updates 01.AI model list, closes [lobehub#2471](https://github.com/bentwnghk/lobe-chat/issues/2471) ([f28711a](f28711a)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
…#2318) * fix form not update * Update ModelConfigModal.tsx * fix lobehub#2319 * react/jsx-sort-props * lobehub#1811 * onCancel closeModal * zIndex
### [Version 0.159.4](lobehub/lobe-chat@v0.159.3...v0.159.4) <sup>Released on **2024-05-14**</sup> #### 🐛 Bug Fixes - **misc**: Refresh model config form & mobile footer button lost. #### 💄 Styles - **misc**: Add GPT-4o model, update perplexity models, updates 01.AI model list. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Refresh model config form & mobile footer button lost, closes [lobehub#2318](lobehub#2318) [lobehub#2319](lobehub#2319) [lobehub#1811](lobehub#1811) ([eadcefc](lobehub@eadcefc)) #### Styles * **misc**: Add GPT-4o model, closes [lobehub#2481](lobehub#2481) ([ae6a03f](lobehub@ae6a03f)) * **misc**: Update perplexity models, closes [lobehub#2469](lobehub#2469) ([488cde7](lobehub@488cde7)) * **misc**: Updates 01.AI model list, closes [lobehub#2471](lobehub#2471) ([f28711a](lobehub@f28711a)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
由于 Form 的 initialValues 只会在初次渲染时改变,导致更换自定义模型时,设置页的值没有跟随更新。
📝 补充信息 | Additional Information
fix #2294
fix #2319
fix #1977
fix #2456
close #1811