Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
839 views
in Technique[技术] by (71.8m points)

sharepoint - Render additional details in mgt-person-card after opened

I have added additional details into the person card, very similar to this:

    <mgt-person person-query="me" view="twolines" person-card="hover">
      <template data-type="person-card">
        <mgt-person-card inherit-details>
          <template data-type="additional-details">
            <h3>Stuffed Animal Friends:</h3>
            <ul>
              <li>Giraffe</li>
              <li>lion</li>
              <li>Rabbit</li>
            </ul>
          </template>
        </mgt-person-card>
      </template>
    </mgt-person>

However, then content that would be rendered here, is coming from another data source. And since I am rendering many mgt-person objects, this would generate a lot of network traffic on the page.

Is it possible to insert additional details based on an event or similar of some sort? So that once the user hover or click on an mgt-person object and opens the mgt-person-card object, then the additional details gets loaded and displayed?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

@Frank-Ove Kristiansen,

There is Template rendered event that should meet your requirement:

And The official doc has provided a demo:

enter image description here

BR


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...