Skip to content

dbeaver/pro#4898 migrate driver properties to data grid table - #4654

Open
devnaumov wants to merge 1 commit into
develfrom
dbeaver/pro#4898-driver-properties-table
Open

devnaumov wants to merge 1 commit into
develfrom
dbeaver/pro#4898-driver-properties-table

Conversation

@devnaumov

@devnaumov devnaumov commented Sep 14, 2026

Copy link
Copy Markdown
Member

closes 4898

PR replaces the old driver properties list with a virtualized DataGrid.

The DataGrid cell API now provides tabIndex as the third callback argument. react-data-grid already calculates this value for interactive controls, but our wrapper did not expose it. Passing it to inputs, comboboxes, and buttons makes keyboard navigation work correctly.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 91 complexity

Metric Results
Complexity 91

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment on lines +36 to +41
useLayoutEffect(() => {
if (inputRef.current && autoFocus) {
inputRef.current.focus();
onFocusHandled();
}
}, [autoFocus, onFocusHandled]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this useEffect, and do something like this:

const [propertyIdToFocus, setPropertyIdToFocus] = useState<string | null>(null);

const focusPropertyInput = useCallback((input: HTMLInputElement | null) => {
  if (input) {
    input.focus();
    setPropertyIdToFocus(null);
  }
}, []);

<DriverPropertyNameCell
  property={property}
  error={!isKeyUnique(property.key)}
  readOnly={readOnly}
  inputRef={property.id === propertyIdToFocus ? focusPropertyInput : undefined}
  tabIndex={tabIndex}
  onChange={changeName}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants