new config proposal

This commit is contained in:
Niels Lyngsø
2024-01-30 21:59:59 +01:00
parent e70221220a
commit 8663e69d2c

View File

@@ -11,12 +11,18 @@ export type ModelEntryType = {
};
const SORTER_CONFIG: UmbSorterConfig<ModelEntryType, ExampleSorterItem> = {
compareElementToModel: (element, model) => {
/*compareElementToModel: (element, model) => {
return element.name === model.name;
},*/
getUniqueOfElement: (element) => {
return element.name;
},
querySelectModelToElement: (container, modelEntry) => {
getUniqueOfModel: (modelEntry) => {
return modelEntry.name;
},
/*querySelectModelToElement: (container, modelEntry) => {
return container.querySelector("example-sorter-item[name='" + modelEntry.name + "']");
},
},*/
identifier: 'string-that-identifies-all-example-sorters',
itemSelector: 'example-sorter-item',
containerSelector: '.sorter-container',