Skip to content

Commit

Permalink
fix(comp:table): set expandable trigger button type (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm committed Jun 16, 2022
1 parent 8f3f696 commit a59b764
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ exports[`Carousel > render work 1`] = `
</div>
<!---->
<ul class=\\"ix-carousel-dot ix-carousel-dot-bottom\\">
<li class=\\"ix-carousel-dot-item ix-carousel-dot-item-active\\"><button class=\\"ix-carousel-dot-item-default\\"></button></li>
<li class=\\"ix-carousel-dot-item\\"><button class=\\"ix-carousel-dot-item-default\\"></button></li>
<li class=\\"ix-carousel-dot-item ix-carousel-dot-item-active\\"><button class=\\"ix-carousel-dot-item-default\\" type=\\"button\\"></button></li>
<li class=\\"ix-carousel-dot-item\\"><button class=\\"ix-carousel-dot-item-default\\" type=\\"button\\"></button></li>
</ul>
</div>"
`;
2 changes: 1 addition & 1 deletion packages/components/carousel/src/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default defineComponent({
const children = slots.dot ? (
slots.dot({ index, isActive })
) : (
<button class={`${prefixCls}-dot-item-default`}></button>
<button class={`${prefixCls}-dot-item-default`} type="button"></button>
)
return (
<li key={node.key!} class={itemClass} onClick={() => onClick(index)} onMouseenter={() => onMouseenter(index)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`Table > basic work > render work 1`] = `
<tbody>
<!---->
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\">
<!----><label class=\\"ix-checkbox ix-checkbox-disabled\\" role=\\"checkbox\\" aria-checked=\\"false\\" aria-disabled=\\"true\\"><span class=\\"ix-checkbox-input\\"><input type=\\"checkbox\\" class=\\"ix-checkbox-input-inner\\" aria-hidden=\\"true\\" disabled=\\"\\"><span class=\\"ix-checkbox-input-box\\"></span></span>
<!---->
Expand All @@ -65,7 +65,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -93,7 +93,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -121,7 +121,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\">
<!----><label class=\\"ix-checkbox ix-checkbox-disabled\\" role=\\"checkbox\\" aria-checked=\\"false\\" aria-disabled=\\"true\\"><span class=\\"ix-checkbox-input\\"><input type=\\"checkbox\\" class=\\"ix-checkbox-input-inner\\" aria-hidden=\\"true\\" disabled=\\"\\"><span class=\\"ix-checkbox-input-box\\"></span></span>
<!---->
Expand All @@ -147,7 +147,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -175,7 +175,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -203,7 +203,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\">
<!----><label class=\\"ix-checkbox ix-checkbox-disabled\\" role=\\"checkbox\\" aria-checked=\\"false\\" aria-disabled=\\"true\\"><span class=\\"ix-checkbox-input\\"><input type=\\"checkbox\\" class=\\"ix-checkbox-input-inner\\" aria-hidden=\\"true\\" disabled=\\"\\"><span class=\\"ix-checkbox-input-box\\"></span></span>
<!---->
Expand All @@ -229,7 +229,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -257,7 +257,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\">
<!---->
</button><a></a></td>
<td class=\\"ix-table-align-start\\">
Expand Down Expand Up @@ -285,7 +285,7 @@ exports[`Table > basic work > render work 1`] = `
</td>
</tr>
<tr class=\\"\\">
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\"><button class=\\"ix-table-expandable-trigger\\" type=\\"button\\"><i class=\\"ix-icon ix-icon-right\\" style=\\"transform: rotate(0deg);\\" role=\\"img\\" aria-label=\\"right\\"></i></button><a></a></td>
<td class=\\"ix-table-align-start\\">
<!----><label class=\\"ix-checkbox ix-checkbox-disabled\\" role=\\"checkbox\\" aria-checked=\\"false\\" aria-disabled=\\"true\\"><span class=\\"ix-checkbox-input\\"><input type=\\"checkbox\\" class=\\"ix-checkbox-input-inner\\" aria-hidden=\\"true\\" disabled=\\"\\"><span class=\\"ix-checkbox-input-box\\"></span></span>
<!---->
Expand Down
2 changes: 1 addition & 1 deletion packages/components/table/src/main/body/BodyCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function renderExpandableChildren(
}

return (
<button class={`${prefixCls}-expandable-trigger`} style={style} onClick={props.handleExpend}>
<button class={`${prefixCls}-expandable-trigger`} style={style} type="button" onClick={props.handleExpend}>
{iconNode}
</button>
)
Expand Down

0 comments on commit a59b764

Please sign in to comment.