Files
discourse-data-explorer/assets/javascripts/discourse/components/explorer-schema.hbs
T
Penar Musaraj 3907c49263 FIX: Reduce issues when debouncing schema search (#241)
Previously the debounced value was both setting the filter value and
updating the input's text value. This causes visible UI issues, because
the debounce updating the input's text value would sometimes reset it,
especially if/when typing quickly.

This PR also uses sticky positioning for the search form, so that it
stays visible even when scrolling the list of schema tables.
2023-04-18 10:33:25 -04:00

31 lines
771 B
Handlebars

{{#if this.hideSchema}}
<DButton
@action={{this.expandSchema}}
@icon="chevron-left"
@class="no-text unhide"
/>
{{else}}
<div class="schema">
<div class="schema-search inline-form full-width">
<input
type="text"
{{on "input" (action "filterChanged" value="target.value")}}
/>
<DButton
@action={{this.collapseSchema}}
@icon="chevron-right"
@class="no-text"
/>
</div>
<div class="schema-container">
<ConditionalLoadingSpinner @condition={{this.loading}}>
<ul>
{{#each this.filteredTables as |table|}}
<ExplorerSchema::OneTable @table={{table}} />
{{/each}}
</ul>
</ConditionalLoadingSpinner>
</div>
</div>
{{/if}}