Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
duongdo_df
Regular Visitor

Custom visuals issue: React component z-index.

Hello, I am developing a custom date picker with React and I have an issue:

I'm using a third-party library called "Ant Design" (https://www.npmjs.com/package/antd)

This is a date picker:

duongdo_df_0-1649402688990.png

After I click on it:

duongdo_df_1-1649402725937.png

So I need to resize the custom visual to a bigger size to see the calendar clearly.

duongdo_df_2-1649402789955.png

Is there an approach to fix this without resizing the custom visual but still can see the calendar like the default HTML input date picker like this?

duongdo_df_3-1649402970785.png

Thank you!!

 

 

 

 

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @duongdo_df - unfortunately not. This is a limitation of the sandbox for custom visuals, and HTML elements are not permitted to exceed its borders. There are two potential options here (although both of them may not suitable for the library you are using):

  1. Use standard HML <input> elements. These can overflow the conents, but ae not very customisable (and what can be customised is sometimes browser-specific). This was my preference when building my own slicers previously.
  2. Use the dialog box API, which is the MS-supported way of creating content that overflows the visual boundaries. This could potentially support your library if it allows you to manage the display of the picker when the dropdown is clicked.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @duongdo_df - unfortunately not. This is a limitation of the sandbox for custom visuals, and HTML elements are not permitted to exceed its borders. There are two potential options here (although both of them may not suitable for the library you are using):

  1. Use standard HML <input> elements. These can overflow the conents, but ae not very customisable (and what can be customised is sometimes browser-specific). This was my preference when building my own slicers previously.
  2. Use the dialog box API, which is the MS-supported way of creating content that overflows the visual boundaries. This could potentially support your library if it allows you to manage the display of the picker when the dropdown is clicked.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors