Skip to content

Commit

Permalink
Remove label from dataview checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-murugan committed Dec 12, 2024
1 parent 05bb54c commit 8006447
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import { CheckboxControl } from '@wordpress/components';

/**
Expand Down Expand Up @@ -31,17 +30,7 @@ export default function DataViewsSelectionCheckbox< Item >( {
const checked = ! disabled && selection.includes( id );
let selectionLabel;
if ( titleField?.getValue && item ) {
// eslint-disable-next-line @wordpress/valid-sprintf
selectionLabel = sprintf(
checked
? /* translators: %s: item title. */ __( 'Deselect item: %s' )
: /* translators: %s: item title. */ __( 'Select item: %s' ),
titleField.getValue( { item } )
);
} else {
selectionLabel = checked
? __( 'Select a new item' )
: __( 'Deselect item' );
selectionLabel = titleField.getValue( { item } );
}
return (
<CheckboxControl
Expand Down

0 comments on commit 8006447

Please sign in to comment.