Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions addon/components/hyper-table-v2/manage-columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ export default class HyperTableV2ManageColumns extends Component<HyperTableV2Man
this.displayAvailableFields = true;
next(this, () => {
this.dropdownVisibility = 'visible';

later(
this,
() => {
document.querySelector<HTMLInputElement>('.available-fields-wrapper input')?.focus();
},
150
);
});
}
}
Expand All @@ -119,6 +127,7 @@ export default class HyperTableV2ManageColumns extends Component<HyperTableV2Man
this,
() => {
this.displayAvailableFields = false;
this.searchColumnDefinitionKeyword = '';
},
300
);
Expand Down
13 changes: 12 additions & 1 deletion addon/components/hyper-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { A } from '@ember/array';
import Component from '@ember/component';
import { computed, observer, set } from '@ember/object';
import { alias, and, filterBy } from '@ember/object/computed';
import { debounce, once, scheduleOnce } from '@ember/runloop';
import { debounce, later, once, scheduleOnce } from '@ember/runloop';
import { compare, isEmpty, typeOf } from '@ember/utils';

export default Component.extend({
Expand Down Expand Up @@ -242,10 +242,21 @@ export default Component.extend({
}
this.manager.toggleProperty('availableFieldsPanel');
this.manager.set('availableTableViews', false);

later(
this,
() => {
const searchInput = document.querySelector('.available-fields-wrapper input');
if (searchInput !== null) searchInput.focus();
},
150
);
},

closeAvailableFields() {
this.manager.set('availableFieldsPanel', false);
this.set('_availableFieldsKeyword', '');
this.notifyPropertyChange('_orderedFilteredClusters');
},

openAvailableViews() {
Expand Down
4 changes: 2 additions & 2 deletions translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hypertable:
manage_fields:
title: Manage Fields
all_fields: All Fields
search_placeholder: Search Fields
search_placeholder: Search...
no_columns: No columns found
column:
remove: Remove Field
Expand Down Expand Up @@ -87,4 +87,4 @@ hypertable:
records_selected: '{count, plural, =0 {{count} record is selected} =1 {{count} record is selected} other {{count} records are selected}}'
all_records_selected: All records (<b>{count}</b>) are selected
select_all: '{count, plural, =1 {Select all {count} record} other {Select all {count} records}}'
clear: Clear selection
clear: Clear selection