devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
36 lines (35 loc) • 1.41 kB
JavaScript
/**
* DevExtreme (esm/__internal/ui/list/m_list.edit.search.js)
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import searchBoxMixin from "../../../ui/widget/ui.search_box_mixin";
import ListEdit from "./m_list.edit";
const ListSearch = ListEdit.inherit(searchBoxMixin).inherit({
_addWidgetPrefix: className => `dx-list-${className}`,
_getCombinedFilter() {
const dataController = this._dataController;
const storeLoadOptions = {
filter: dataController.filter()
};
dataController.addSearchFilter(storeLoadOptions);
const {
filter: filter
} = storeLoadOptions;
return filter
},
_initDataSource() {
const value = this.option("searchValue");
const expr = this.option("searchExpr");
const mode = this.option("searchMode");
this.callBase();
const dataController = this._dataController;
(null === value || void 0 === value ? void 0 : value.length) && dataController.searchValue(value);
mode.length && dataController.searchOperation(searchBoxMixin.getOperationBySearchMode(mode));
expr && dataController.searchExpr(expr)
}
});
export default ListSearch;