Fixed JavaScript test cases. Replace deprecated inputProps with slotProps.

pull/9033/head
Akshay Joshi 2025-08-06 18:54:04 +05:30
parent 4d078ab747
commit 6aaf47ddb4
2 changed files with 5 additions and 7 deletions

View File

@ -537,9 +537,7 @@ export function InputSwitch({ cid, helpid, value, onChange, readonly, controlPro
readonly ? () => {/*This is intentional (SonarQube)*/ } : onChange
}
id={cid}
inputProps={{
'aria-describedby': helpid,
}}
slotProps={{input: { 'aria-describedby': helpid }}}
{...controlProps}
{...props}
className={(readonly || props.disabled) ? 'Form-readOnlySwitch' : null}
@ -586,7 +584,7 @@ export function InputCheckbox({ cid, helpid, value, onChange, controlProps, read
checked={Boolean(value)}
onChange={readonly ? () => {/*This is intentional (SonarQube)*/ } : onChange}
color="primary"
inputProps={{ 'aria-describedby': helpid, 'title': controlProps.label}}
slotProps={{input: { 'aria-describedby': helpid, 'title': controlProps.label }}}
{...props} />
}
disabled={disabled}
@ -639,7 +637,7 @@ export function InputRadio({ helpid, value, onChange, controlProps, readonly, la
}
value={value}
name="radio-button-demo"
inputProps={{ 'aria-label': value, 'aria-describedby': helpid }}
slotProps={{input: { 'aria-label': value, 'aria-describedby': helpid }}}
disableRipple
/>
}

View File

@ -403,7 +403,7 @@ export function getCheckboxCell({title}) {
checked={table.getIsAllRowsSelected()}
indeterminate={table.getIsSomeRowsSelected()}
onChange={table.getToggleAllRowsSelectedHandler()}
inputProps={{ 'aria-label': title }}
slotProps={{input: { 'aria-label': title }}}
/>
</div>
);
@ -427,7 +427,7 @@ export function getCheckboxHeaderCell({title}) {
indeterminate={row.getIsSomeSelected()}
disabled={!row.getCanSelect()}
onChange={row.getToggleSelectedHandler()}
inputProps={{ 'aria-label': title }}
slotProps={{input: { 'aria-label': title}}}
/>
</div>
);