Skip to content

Commit

Permalink
widgetInput: new property to debug ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rvion committed Dec 7, 2023
1 parent 571b6e2 commit 5c52541
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controls/shared/WidgetWithLabelUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const WidgetWithLabelUI = observer(function WidgetWithLabelUI_(p: {
let label: Maybe<string | false> = req.input.label ?? makeLabelFromFieldName(rootKey)

const isVertical = (() => {
if (p.req.input.showID) return true
if (st.preferedFormLayout === 'auto') {
if (req instanceof KLS.Widget_group) return true
if (req instanceof KLS.Widget_groupOpt) return true
Expand Down Expand Up @@ -111,6 +112,7 @@ export const WidgetWithLabelUI = observer(function WidgetWithLabelUI_(p: {
}
>
{label || '...'}
{p.req.input.showID ? <span tw='opacity-50 italic text-sm'>#{p.req.id.slice(0, 3)}</span> : null}
</span>
)}
<span tw='opacity-30 hover:opacity-100'>{v.state.collapsed ? '▸ {...}' : /*'▿'*/ ''}</span>
Expand Down

0 comments on commit 5c52541

Please sign in to comment.