File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >8.9.3-beta01 </Version >
4+ <Version >8.9.3-beta02 </Version >
55 </PropertyGroup >
66
77 <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0'" >
Original file line number Diff line number Diff line change @@ -16,16 +16,17 @@ export function init(id) {
1616
1717export function update ( id , invalidIds ) {
1818 const el = document . getElementById ( id ) ;
19- const items = [ ...el . children ] ;
19+ const items = [ ...el . querySelectorAll ( ".is-invalid" ) ] ;
2020 const invalidElements = invalidIds . map ( cId => {
2121 const item = document . getElementById ( cId ) ;
22- let parentEl = item . parentElement ;
23- while ( parentEl !== el ) {
24- parentEl = parentEl . parentElement ;
22+ let order = items . indexOf ( item ) ;
23+ if ( order === - 1 ) {
24+ const invalidEl = item . querySelector ( ".is-invalid" ) ;
25+ if ( invalidEl ) {
26+ order = items . indexOf ( invalidEl ) ;
27+ }
2528 }
26- return {
27- item, order : items . indexOf ( item )
28- } ;
29+ return { item, order } ;
2930 } ) ;
3031 invalidElements . sort ( ( a , b ) => b . order - a . order ) ;
3132
You can’t perform that action at this time.
0 commit comments