Dojo dijit button in 4.x API Popup content

1123
6
06-14-2019 11:35 AM
JoeRogan
New Contributor III

Hi, I am trying to use a dojo button in my custom popup content using the newest 4.x API, but it will not render.  Other dijit form items like TextBox and CheckBox work fine.  See attached picture for what happens.  I do not want to use popup actions, the extra header they create takes up too much space.  If I remove the data-dojo-type, a regular button renders fine.

<button data-dojo-attach-point="btnSave" data-dojo-type="dijit/form/Button"
data-dojo-props="iconClass:'dijitIconSave'" type="button">${nls.editprofile.save}
</button>
Thanks!
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Joseph,

   Have you added the claro.css stylesheet and class to the apps body?

<link rel="stylesheet" href="https://js.arcgis.com/4.11/dijit/themes/claro/claro.css">
0 Kudos
JoeRogan
New Contributor III

Hi Robert,

I was not using the claro.css, I was only using this one:

<link rel="stylesheet" href="https://js.arcgis.com/4.11/esri/themes/light/main.css">
 When I add the claro.css the button renders almost correctly, but the check boxes disappear.  It doesn't quite look correct from what I remember of using claro in the past.  Is there a conflict between these two? 
Thanks for the help,
Joe
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Joe,

  Can I see your code?

0 Kudos
JoeRogan
New Contributor III

Robert,

Unfortunately I can't share the code for this app.  It seems like the new 4.x themes are not compatible with the dojo dijit theme.  I'm going to just use custom styling for this on a regular button element and not use dojo dijit buttons.

Cheers.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Joe,

   That's too bad. Dojo dijits do work in 4.x as I have a couple of apps doing this but there is a proper way to set them up for it. Styling the button is a good option though.

0 Kudos
ekleiman22
New Contributor II

Would you so kind to allow to see your examples of using Dojo dijits with 4.x? I try now to make upgrade from 3.36 to 4.* and in my application there is a lot use of dojo and dijits . May be you cancelled to use dojo? 

0 Kudos