Giter Club home page Giter Club logo

Comments (2)

rjaros avatar rjaros commented on August 12, 2024

It's a bit difficult to answer your questions without having the running application. But this is what I can say:

  • Popover seems to be correctly configured (manual mode) and you should be able to show and hide it with showPopover and hidePopover methods.
  • There is no way you can "wait" for the backed call to complete outside of launch. But you can pass some callback function or even the button widget itself to the selectTest method and execute some actions (e.g. show the poprover) at the end of the launch block (after dispatch call).
  • To display progress bar you can use kvision-pace module. Or use any other kind of progress indicator started at the beginning of your launch and stopped at the end.

from kvision.

chavu avatar chavu commented on August 12, 2024

Thank you. I implemented your suggestion to pass the button and enable/show popover after the backend call has completed. This solved my issues 1 & 3. It's working okay when fetching each record everytime (i.e not loading into collection to reuse in next request). Below is the updated selectTest method. For issue 4 I will try the kvision-pace module. For issue 2, I think I will need to split my redux reducers and have the tabulator view subscribe to part of the store state and not the whole state.

    fun selectTest(testId: Int, testCaseId: String, showButton: Button) = launch {
        val state = uatStore.getState()
        var test: Test?
        val list = state.testCollection.toMutableList()
        test = list.firstOrNull { it.id == testId && it.testCaseId == testCaseId }
        if (test == null) {
            test = projectService.getTestById(testId, testCaseId)
//            list.add(test)
//            uatStore.dispatch(UatAction.SetTestCollection(list))
        }
        showButton.enablePopover(
            PopoverOptions(
                title = "${test.title}",
                content = "${test.description}",
                rich = true,
                triggers = listOf(Trigger.MANUAL)
            )
        )
        showButton.showPopover()

    }
``

from kvision.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.