Skip to content

Commit

Permalink
#6297 examples.tableStore.MainContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiu committed Jan 26, 2025
1 parent 4152505 commit 315c3b7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
27 changes: 14 additions & 13 deletions examples/tableStore/MainContainer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class MainContainer extends Viewport {
for (; j < repeats; j++) {
for (i=0; i < countRecords; i++) {
record = store.items[i];
Object.entries(record).forEach(([field, value]) => {

Object.entries(record[Symbol.for('data')]).forEach(([field, value]) => {
if (field !== 'githubId') {
if (value.includes(string1)) {
newValue = value.replace(string1, string2);
Expand All @@ -72,7 +73,7 @@ class MainContainer extends Viewport {

record[field] = newValue; // triggers the change
}
});
})
}
}
}
Expand Down Expand Up @@ -110,7 +111,7 @@ class MainContainer extends Viewport {
listeners: {
change: function(data) {
if (data.value) {
Neo.getComponent('myTableStoreContainer').selectionModel = {
Neo.getComponent('myTableStoreContainer').view.selectionModel = {
ntype: this.value
};
}
Expand All @@ -127,7 +128,7 @@ class MainContainer extends Viewport {
listeners: {
change: function(data) {
if (data.value) {
Neo.getComponent('myTableStoreContainer').selectionModel = {
Neo.getComponent('myTableStoreContainer').view.selectionModel = {
ntype: this.value
};
}
Expand All @@ -144,7 +145,7 @@ class MainContainer extends Viewport {
listeners: {
change: function(data) {
if (data.value) {
Neo.getComponent('myTableStoreContainer').selectionModel = {
Neo.getComponent('myTableStoreContainer').view.selectionModel = {
ntype: this.value
};
}
Expand All @@ -161,7 +162,7 @@ class MainContainer extends Viewport {
listeners: {
change: function(data) {
if (data.value) {
Neo.getComponent('myTableStoreContainer').selectionModel = {
Neo.getComponent('myTableStoreContainer').view.selectionModel = {
ntype: this.value
};
}
Expand All @@ -178,20 +179,20 @@ class MainContainer extends Viewport {
listeners: {
change: function(data) {
if (data.value) {
Neo.getComponent('myTableStoreContainer').selectionModel = {
Neo.getComponent('myTableStoreContainer').view.selectionModel = {
ntype: this.value
};
}
}
}
}]
}, {
module : TableContainer,
id : 'myTableStoreContainer',
selectionModel: CellModel,
store : MainStore,
width : '100%',
wrapperStyle : {height: '300px'},
module : TableContainer,
id : 'myTableStoreContainer',
store : MainStore,
viewConfig : {selectionModel: CellModel},
width : '100%',
wrapperStyle: {height: '300px'},

columns: [{
dataField: 'firstname',
Expand Down
6 changes: 3 additions & 3 deletions examples/tableStore/MainModel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ class MainModel extends Model {

fields: [{
name: 'country',
type: 'string'
type: 'html'
}, {
name: 'firstname',
type: 'string'
type: 'html'
}, {
name: 'githubId',
type: 'string'
}, {
name: 'lastname',
type: 'string'
type: 'html'
}]
}
}
Expand Down

0 comments on commit 315c3b7

Please sign in to comment.