Hey guys. I have problem when click filter button. i want hide addToSet button after click filter button in browser screen. Any suggestions are appreciated. Thanks.
Hello @nguyencongphuong!
What version of the platform are you using?
In 7.2 version, the addToSet
action is a standard action that is added to the XML descriptor as follows:
<groupTable id="customersTable" dataContainer="customersDc">
<actions>
<action id="addToSet" type="addToSet"/>
...
</actions>
<buttonsPanel>
<button action="customersTable.addToSet"/>
...
</buttonsPanel>
You can subscribe on CollectionLoader#PostLoadEvent
or set Filter#setAfterAppliedHandler()
and then execute the following code:
customersTable.getActionNN("addToSet").setVisible(false);
Regards,
Gleb
1 Like
Hello @durygin. Thank for support.
the version I am using is 7.0.6. I tried it your way but it looks like AddToSet’s id button is not addToSet.
@nguyencongphuong
In 7.0.6 version, you could try to find AddToSet
action by “filter.addToSet” action id:
customersTable.getActionNN("filter.addToSet").setVisible(false);
or by “addToSetBtn” button id:
customersTable.getButtonsPanel().getComponent("addToSetBtn").setVisible(false);
1 Like
Thank you again. this is what i am looking for.