mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(radio-button): forward focus
, blur
events
This commit is contained in:
parent
c6c80d35a9
commit
db5aaee501
3 changed files with 9 additions and 2 deletions
|
@ -71,6 +71,8 @@
|
|||
required={$groupRequired ?? required}
|
||||
{value}
|
||||
class:bx--radio-button={true}
|
||||
on:focus
|
||||
on:blur
|
||||
on:change
|
||||
on:change={() => {
|
||||
if (update) {
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
{id}
|
||||
{name}
|
||||
{ref}
|
||||
on:focus={() => {
|
||||
console.log("focus");
|
||||
}}
|
||||
on:blur={() => {
|
||||
console.log("blur");
|
||||
}}
|
||||
on:change={() => {
|
||||
console.log("change");
|
||||
}}
|
||||
|
|
|
@ -91,8 +91,7 @@ describe("RadioButton", () => {
|
|||
expect(consoleLog).toHaveBeenCalledWith("change");
|
||||
});
|
||||
|
||||
// TODO(bug): forward focus/blur events.
|
||||
it.skip("should handle focus and blur events", async () => {
|
||||
it("should handle focus and blur events", async () => {
|
||||
const consoleLog = vi.spyOn(console, "log");
|
||||
render(RadioButton);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue