Skip to content

Commit

Permalink
chore: fix PR comments. Fix docs, better object compare and leftover …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
CachedaCodes committed Sep 12, 2023
1 parent cd8bb29 commit 092e933
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const wireDispatchWithoutPayload = namespacedWireDispatchWithoutPayload(moduleNa
export const addQueryToHistoryQueries = wireDispatch('addQueryToHistory');

/**
* Saves a new query from a selectedQueryPreview into the history queries.
* Saves the selectedQueryPreview query into the history queries.
*
* @public
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ The content of the button is customizable via its default slot

A list of events that the component will emit:

- `UserClickedPanelToggleButton`: the event is emitted after the user clicks the button. The event
payload is the id of the panelId that is going to be toggled.
- `UserAcceptedAQueryPreview`: the event is emitted after the user clicks the button. The event
payload is the `QueryPreviewInfo` of the query.
</docs>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import { Component, Prop, Inject, Watch } from 'vue-property-decorator';
import { Dictionary } from '@empathyco/x-utils';
import { SearchRequest, Result } from '@empathyco/x-types';
import { getNewAndUpdatedKeys } from '@empathyco/x-utils/src';
import { State } from '../../../components/decorators/store.decorators';
import { LIST_ITEMS_KEY } from '../../../components/decorators/injection.consts';
import { XProvide } from '../../../components/decorators/injection.decorators';
Expand Down Expand Up @@ -197,7 +198,7 @@
this.$watch(
() => this.queryPreviewRequest,
(newRequest, oldRequest) => {
if (JSON.stringify(newRequest) !== JSON.stringify(oldRequest)) {
if (getNewAndUpdatedKeys(newRequest, oldRequest).length) {
this.emitQueryPreviewRequestUpdated(newRequest);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
* @public
*/
export interface QueriesPreviewConfig {
/**
* Debounce time measured in milliseconds used to delete the query preview module selected query
* to wait & ensure user is not refining the search by typing or selecting a suggestion.
*/
debounceInMs: number;
/**
* Maximum number of items to request.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { loadedQueriesPreview } from './getters/loaded-queries-preview.getter';
export const queriesPreviewXStoreModule: QueriesPreviewXStoreModule = {
state: () => ({
config: {
debounceInMs: 250,
maxItemsToRequest: 24
},
queriesPreview: {},
Expand Down

0 comments on commit 092e933

Please sign in to comment.