123123213weqw opened a new pull request, #2023:
URL: https://github.com/apache/rocketmq-dashboard/pull/2023

   ## What is the purpose of the change
   
   Fix #2012.
   
   The Metrics data source tab started listDataSources() on mount while the Add 
data source action remained enabled. A user could create a data source before 
the initial list resolved; the create response was appended to local state, but 
the late initial list response then called setDataSources(sources) 
unconditionally and removed the newly created row from the UI.
   
   ## Brief changelog
   
   - settings DataSourceTab: disable the Add data source button while the 
initial list request is pending, so no mutation can race the initial list 
response
   
   ## How was this patch verified
   
   - npx vitest run src/pages/settings/__tests__/DataSourceTab.test.tsx (7 
passed)
   - npx tsc -b clean
   - npx eslint . clean
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to