@boikom
@boikom
Forum Replies Created
-
AuthorPosts
-
admin
KeymasterHi Starlight Sparkle,
the newly added item via the “addNewTab” button always has a label of “New Tab” and it’s not possible to change that via API. However since the new item becomes the selected item by default you can accomplish the same result by binding to thechange
event and callingupdate
method on it. Here’s how to do it:document.querySelector('smart-tabs').addEventListener('change', function (event) { const newTabIndex = event.detail.index; //Get all tab items inside the element const allTabItems = this.querySelectorAll('smart-tab-item'); //Update the label if (allTabItems[newTabIndex].label === 'New Tab') { this.update(newTabIndex, 'New Custom Label'); } });
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comadmin
KeymasterDamn, can’t believe I missed that in the documentation. Sorry and thanks!
But on a related note, is it possible to set the default label that will be used by new tabs created through the built-in “new tab” button?admin
KeymasterHello Starlight Sparkle,
Thank you for your interest. The proper way to update a tab item’s label and/or content is by calling the method update. Here is an example of setting only the title:
document.getElementById('tabs').update(0, 'Updated title');
If you wish to change the content, too, pass a third argument, e.g.:
document.getElementById('tabs').update(0, 'Updated title', 'Updated content');
Here is also a demo that showcases this method among others: https://www.htmlelements.com/demos/tabs/insert-remove-update/.
Best regards,
Dimitar
Smart HTML Elements Team
https://www.htmlelements.comOctober 23, 2019 at 12:08 pm in reply to: grid appearence showRowNumber not working in 4.5>= #100446admin
KeymasterHi cetinsert,
Since you are using this product for months now. Could you share your license key, please?
Best Regards,
George
Smart HTMLElements Team
https://www.htmlelements.comOctober 23, 2019 at 11:05 am in reply to: grid appearence showRowNumber not working in 4.5>= #100445admin
KeymasterIndeed, changing showRowNumber to showRowHeaderNumber works.
This must have been a simple oversight in your packaging or htmlelements.com demos might have been revised since 4.6 was published.
Thank you for your prompt response!October 23, 2019 at 11:00 am in reply to: grid appearence showRowNumber not working in 4.5>= #100444admin
Keymasterhttps://www.htmlelements.com/demos/grid/row-headers/
has showRowHeaderNumber.
Please consult your own resources before responding to ensure an informed answer.October 23, 2019 at 10:58 am in reply to: grid appearence showRowNumber not working in 4.5>= #100443admin
KeymasterWhat is the current recommended solution for displaying row numbers?
/demos/grid/row-headers/ are still distributed with 4.5 and 4.6.October 23, 2019 at 10:26 am in reply to: grid appearence showRowNumber not working in 4.5>= #100442admin
KeymasterHello,
Such Grid property is not available in the current version. This is by design.
Regards,
George
HTML Elements Team
https://www.htmlelements.comOctober 11, 2019 at 7:02 am in reply to: Custom angular components not rendered in panel content #100436admin
KeymasterHi mgndzz,
Have a look at this topic Angular Dynamic Component Loading. It demonstrates how to load Dynamic Angular Components with our smart framework. If that doesn’t help you out you can export your angular component as a custom element and use the custom element.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comadmin
KeymasterHi mk_dir,
The size of the Window header is controlled by a CSS variable. In order to change the size simply set the CSS variable like so:smart-window { --smart-window-header-height: 30px; /* The default size is 50px */ }
Our themes do not affect the sizes of any of the elements. They only define their colors.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comSeptember 27, 2019 at 1:35 pm in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100359admin
KeymasterHello jtara,
We are unable to reproduce such issue. If you encounter an issue in your application, then please share codepen example, which demonstrates it.
Regards,
George
Smart HTML Elements
https://www.htmlelements.com/September 26, 2019 at 3:26 pm in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100358admin
KeymasterOK, now I tested my grid which is used to display a summary of rows added to a database one by one.
That is, a user fills a form, the form is sent to a server with Ajax, and the Ajax response sends back a row with generated ID, etc. then the row is added to the grid.
This works only if the grid is first populated with one dummy row. I no longer need to add at least TWO dummy rows. And there no longer (in 4.5) is an issue where only the first 3 rows added show.
The issue now is that if the grid starts out empty, the rows that I add are not shown.
So, it is still not completely solved.
I will now submit a support request for this.September 26, 2019 at 3:17 pm in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100357admin
KeymasterActually, I need to do a bit more testing, which I will do before submitted a support request.
I have a grid that I populate from an Ajax request. It populates with a modest number of rows > 3 That’s the one that I tried, and I noted that if the grid starts out empty, then it will never show.
I haven’t yet tested if there is still some dependence on number of rows added – e.g. previous behaviour is first 3 adds would show, and after that no more.September 26, 2019 at 3:14 pm in reply to: grid with css height auto and add new row fails to display rows after ~3 adds #100356admin
KeymasterI wrote:
There seems to be a problem if the initial number of rows in the data source is 1 or 0. If it is > 1, then new rows that are added are correctly displayed.
admin wrote:We confirm the Grid component issue reported by jtara. We will resolve it in the next update.
I’m afraid that even in 4.5 there is still a problem. It is SLIGHTLY improved.
Now, it no longer fails with only one row.
However, a grid that is initially created with no rows still fails. You will never see the grid content displayed.
There are of course so many use cases for a grid that initially is empty, and then rows are added. We still have to start out with at least one dummy row.
I will write a support request. Just giving a heads-up here for others.admin
KeymasterHello helkatz,
We prepared a help topic that describes how to add an Angular component dynamically to a tab item. You can find it here: https://www.htmlelements.com/docs/angular-dynamic-component-loading/. We hope it is helpful to you.
Best regards,
Dimitar
Smart HTML Elements Team
https://www.htmlelements.com -
AuthorPosts