Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs #2126

Merged
merged 4 commits into from
Aug 21, 2020
Merged

Fix a few bugs #2126

merged 4 commits into from
Aug 21, 2020

Conversation

amanmahajan7
Copy link
Contributor

@amanmahajan7 amanmahajan7 commented Aug 21, 2020

  • Fix editor not closing on Enter if the value is not changed
  • Fix typo in defaultSortable
  • Change formatterOptions.focusable to a function so different rows can have different focus behavior

@amanmahajan7 amanmahajan7 self-assigned this Aug 21, 2020
src/DataGrid.tsx Outdated
Comment on lines 287 to 289
const formatterOptions = columns[selectedPosition.idx]?.formatterOptions;
const row = rows[selectedPosition.rowIdx];
if ((typeof formatterOptions?.focusable === 'function' && formatterOptions?.focusable(row)) || formatterOptions?.focusable === true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const formatterOptions = columns[selectedPosition.idx]?.formatterOptions;
const row = rows[selectedPosition.rowIdx];
if ((typeof formatterOptions?.focusable === 'function' && formatterOptions?.focusable(row)) || formatterOptions?.focusable === true) {
const focusable = columns[selectedPosition.idx]?.formatterOptions?.focusable;
if ((typeof focusable === 'function' && focusable(rows[selectedPosition.rowIdx])) || focusable === true) {

wdyt?

@amanmahajan7 amanmahajan7 merged commit f8833d2 into canary Aug 21, 2020
@amanmahajan7 amanmahajan7 deleted the am-editor2-bugs branch August 21, 2020 12:00
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