👐 fix: Return Focus to MCP Edit Button after Dialog Closes
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Waiting to run
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Waiting to run
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Publish `@librechat/client` to NPM / build-and-publish (push) Has been cancelled

- Added `editButtonRef` prop to `MCPCardActions` for improved focus management.
- Updated `MCPServerCard` to pass a reference to the edit button, enhancing accessibility.
- Modified `MCPServerDialog` to accept a more flexible `triggerRef` type, allowing for better integration with various button elements.
This commit is contained in:
Danny Avila 2025-12-28 12:43:17 -05:00
parent e4870ed0b0
commit d0835d5222
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
3 changed files with 10 additions and 9 deletions

View file

@ -25,8 +25,8 @@ import MCPServerForm from './MCPServerForm';
interface MCPServerDialogProps {
open: boolean;
onOpenChange: (open: boolean) => void;
children: React.ReactNode;
triggerRef?: React.MutableRefObject<HTMLButtonElement | null>;
children?: React.ReactNode;
triggerRef?: React.MutableRefObject<HTMLDivElement | HTMLButtonElement | null>;
server?: MCPServerDefinition | null;
}