Skip to content

Commit

Permalink
fix(TDOPS-5968): ListView checkboxes alignement (#5126)
Browse files Browse the repository at this point in the history
* fix(TDOPS-5968): ListView checkboxes alignement

* fix snapshot
  • Loading branch information
Gbacc authored Jan 19, 2024
1 parent 941ff4f commit bfe3b20
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-cobras-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/react-components': patch
---

TDOPS-5968 - Fix ListView checkbox alignement
9 changes: 5 additions & 4 deletions packages/components/src/ListView/Items/Item/Item.component.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { Component } from 'react';
import classNames from 'classnames';
import { withTranslation } from 'react-i18next';
import ItemPropTypes from './Item.propTypes';

import classNames from 'classnames';

import Action from '../../../Actions/Action';
import I18N_DOMAIN_COMPONENTS from '../../../constants';
import Checkbox from '../../../Checkbox';
import I18N_DOMAIN_COMPONENTS from '../../../constants';
import Icon from '../../../Icon';
import TooltipTrigger from '../../../TooltipTrigger';
import ItemPropTypes from './Item.propTypes';

class Item extends Component {
componentDidUpdate(prevProps) {
Expand Down Expand Up @@ -38,7 +40,6 @@ class Item extends Component {

const itemId = id && `checkbox-${id}`;
const itemClassName = classNames(
'checkbox',
{ 'switch-nested': children },
{ switch: isSwitchBox },
{ 'with-icon': item.icon },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Item should display a selected item 1`] = `
<div
aria-selected={true}
className="checkbox"
className=""
data-test="item"
data-testid="item"
id="0-item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports[`Items should render 1`] = `
style="height: 42px; left: 0px; position: absolute; top: 40px; width: 100%;"
>
<div
class="checkbox"
class=""
data-test="item-0"
data-testid="item-0"
role="option"
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`Items should render 1`] = `
>
<div
aria-selected="true"
class="checkbox"
class=""
data-test="item-1"
data-testid="item-1"
role="option"
Expand Down Expand Up @@ -103,7 +103,7 @@ exports[`Items should render 1`] = `
style="height: 42px; left: 0px; position: absolute; top: 124px; width: 100%;"
>
<div
class="checkbox"
class=""
data-test="item-2"
data-testid="item-2"
role="option"
Expand Down

0 comments on commit bfe3b20

Please sign in to comment.