Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
830 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...