Skip to content

Commit 67410a8

Browse files
authored
feat(Utility): add all parameter on getDescribedElement method (#7778)
* feat: 增加 all 参数 默认 false * chore: bump version 10.4.2-beta02
1 parent 6847ec2 commit 67410a8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>10.4.2-beta01</Version>
4+
<Version>10.4.2-beta02</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/wwwroot/modules/utility.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import EventHandler from "./event-handler.js"
1+
import EventHandler from "./event-handler.js"
22

33
const vibrate = () => {
44
if ('vibrate' in window.navigator) {
@@ -420,14 +420,14 @@ const drag = (element, start, move, end) => {
420420
element.addEventListener('touchstart', handleDragStart)
421421
}
422422

423-
const getDescribedElement = (element, selector = 'aria-describedby') => {
423+
const getDescribedElement = (element, selector = 'aria-describedby', all = false) => {
424424
if (isElement(element)) {
425425
let id = element.getAttribute(selector)
426426
if (id) {
427427
if (id.indexOf('.') === -1) {
428428
id = `#${id}`
429429
}
430-
return document.querySelector(id)
430+
return all ? document.querySelectorAll(id) : document.querySelector(id)
431431
}
432432
}
433433
return null

0 commit comments

Comments
 (0)