Skip to content

Commit d870daa

Browse files
committed
add non-selected disabled item styles
1 parent 4520bbd commit d870daa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/ui/src/elements/TreeView/NestedSectionsTable/index.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@
229229
opacity: 0.4;
230230
}
231231

232+
&__section--invalid-target {
233+
opacity: 0.4;
234+
}
235+
232236
&__placeholder-section {
233237
display: table-row-group;
234238
pointer-events: none;

packages/ui/src/elements/TreeView/NestedSectionsTable/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,15 @@ export const DivTableSection: React.FC<DivTableSectionProps> = ({
265265

266266
const isOdd = absoluteRowIndex % 2 === 1
267267

268+
const isInvalidTarget = invalidTargetIDs?.has(rowItem.rowID)
269+
268270
const renderResult = (
269271
<React.Fragment key={rowItem.rowID}>
270272
<div
271273
className={[
272274
`${baseClass}__section`,
273275
isDragging && `${baseClass}__section--dragging`,
276+
isDragging && isInvalidTarget && `${baseClass}__section--invalid-target`,
274277
isOdd && `${baseClass}__section--odd`,
275278
targetParentID === rowItem.rowID && `${baseClass}__section--target`,
276279
selectedRowIDs.includes(rowItem.rowID) && `${baseClass}__section--selected`,

0 commit comments

Comments
 (0)