Our powerful JS Calendar component


Post by kundansah »

Hi,
I am using bryntum calendar in "Drag from external source demo" mode. I have a combo box for topic field. After dragging the record to calendar the topic field is not populating on double click of the record.

bryntum calendar.png
bryntum calendar.png (85.32 KiB) Viewed 850 times

On double click of the record ".NET Modern Enterprise Development"

bryntum calendar on double click.png
bryntum calendar on double click.png (36.51 KiB) Viewed 850 times
topicCombo: {
        type: "combo",
        label: "Topic",
        displayField: "name",
        store: topicEventStore.chain(),
        ref: "topicCombo",
        weight: 0,
        //valueField:"id",        
primaryFilter: { filterBy(record) { if (this.value == null) { return true; } let lowerCaseValue = this.value.toLowerCase() //return record?.name.toLowerCase().includes(lowerCaseValue) return record?.name ? record?.name.toLowerCase().indexOf(lowerCaseValue) !== -1 : false || record.keywords ? record?.keywords.toLowerCase().indexOf(lowerCaseValue) !== -1 : false || record?.solution_area ? record?.solution_area.toLowerCase().indexOf(lowerCaseValue) !== -1 : false || record?.industry ? record?.industry.toLowerCase().indexOf(lowerCaseValue) !== -1 : false || record?.description ? record?.description.toLowerCase().indexOf(lowerCaseValue) !== -1 : false
}, }, required: true, },

How can i populate the topic field (combo type) also on double click of the record?


Post by Animal »

What is topicEventStore?

If that gets mutated, then a store chained off it will refresh itself.

But you have some bad things happening there:

Screenshot 2024-01-03 at 15.00.46.png
Screenshot 2024-01-03 at 15.00.46.png (173.75 KiB) Viewed 826 times

I'd never tolerate misalignment like that. This is how it should look:

Screenshot 2024-01-03 at 14.56.59.png
Screenshot 2024-01-03 at 14.56.59.png (536.66 KiB) Viewed 826 times

Post by marcio »

Hey kundansah,

Thanks for reaching out. Could you clarify, if you want the topicCombo to be filled when you open the editor?

Also, if you could provide a sample project with that behavior that you mentioned, that would be helpful for us to assist you. You can check our guidelines here https://www.bryntum.com/forum/viewtopic.php?f=1&t=772

Best regards,
Márcio


Post by kundansah »

Thanks for the quick response.
Yes, I want the topic field to be filled when I open the editor.

TopicCombo is containing the list of all the topics. Topic field in editor is linked with TopicCombo. I want the topic field to be filled with respective value from topic combo when I open the editor.


Post by Animal »

It will be difficult to debug your app without access to the source code.

That field is your field, using your store: topicEventStore.chain(),. It's not our store.

Your code must ensure that that store is populated somewhere. What does your code which does that look like?


Post by kundansah »

Thanks for the quick response.

I have tried with store as topicEventStore. It is still giving me the same issue.
I am attaching the output of both topicEventStore and topicEventStore.chain() here.

topicEventStore :

topicEventStore.js
(426.86 KiB) Downloaded 48 times

topicEventStore.chain() :

topicEventStore.chain().js
(426.86 KiB) Downloaded 55 times

the code for topicEventStore is :

  let topicIndex = sessionData.index;
  let topicEventStore = Store.getStore("topicEventStore");
  console.log("topiceventstore",topicEventStore);
  console.log("chain",topicEventStore.chain())
  let topicObject = topicEventStore.find(
    (res) => res.index == topicIndex
  );

Post by Animal »

So this is a Combo which you have added to the sidebar?

Have you checked what that store contains in the debugger? Added event listeners to see what code might be mutating it?

Because the Combo will display in its dropdown whatever records are in its store (and pass any filters which may have been applied to it).


Post Reply